summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/crypto
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-07 12:09:38 +0100
committerFlorian Dold <florian@dold.me>2022-03-07 12:09:38 +0100
commit0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2 (patch)
tree233cbe5e18925339daedfaffb2882d390b3479a5 /packages/taler-wallet-core/src/crypto
parent2cfefa93920eba7bc4bfa3ca788a7bcf74c149f5 (diff)
downloadwallet-core-0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2.tar.gz
wallet-core-0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2.tar.bz2
wallet-core-0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2.zip
address protocol changes in the exchange
The exchange now has a wad fee and truncates the payto hash in signatures
Diffstat (limited to 'packages/taler-wallet-core/src/crypto')
-rw-r--r--packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
index bd18e8d2e..f9cc63ecc 100644
--- a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
@@ -48,6 +48,7 @@ import {
hashCoinEv,
hashCoinEvInner,
hashDenomPub,
+ hashTruncate32,
keyExchangeEcdheEddsa,
Logger,
MakeSyncSignatureRequest,
@@ -329,6 +330,7 @@ export class CryptoImplementation {
.put(timestampRoundedToBuffer(wf.endStamp))
.put(amountToBuffer(wf.wireFee))
.put(amountToBuffer(wf.closingFee))
+ .put(amountToBuffer(wf.wadFee))
.build();
const sig = decodeCrock(wf.sig);
const pub = decodeCrock(masterPub);
@@ -376,7 +378,7 @@ export class CryptoImplementation {
sig: string,
masterPub: string,
): boolean {
- const paytoHash = hash(stringToBytes(paytoUri + "\0"));
+ const paytoHash = hashTruncate32(stringToBytes(paytoUri + "\0"));
const p = buildSigPS(TalerSignaturePurpose.MASTER_WIRE_DETAILS)
.put(paytoHash)
.build();