From 0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 7 Mar 2022 12:09:38 +0100 Subject: address protocol changes in the exchange The exchange now has a wad fee and truncates the payto hash in signatures --- packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-core/src/crypto') 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(); -- cgit v1.2.3