diff options
author | Florian Dold <florian@dold.me> | 2022-03-07 12:09:38 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-07 12:09:38 +0100 |
commit | 0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2 (patch) | |
tree | 233cbe5e18925339daedfaffb2882d390b3479a5 /packages/taler-wallet-core/src/crypto | |
parent | 2cfefa93920eba7bc4bfa3ca788a7bcf74c149f5 (diff) | |
download | wallet-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.ts | 4 |
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(); |