diff options
author | Florian Dold <florian@dold.me> | 2024-06-30 19:20:54 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-06-30 19:20:54 +0200 |
commit | 93283808cfef9a947e62cf136f8b204816248d53 (patch) | |
tree | 5988743755df3c0da97c220a27b78704f745083a /packages/taler-wallet-core/src | |
parent | 1bf9dafb3733baaff50b34a668f5ae1f1b503252 (diff) | |
download | wallet-core-93283808cfef9a947e62cf136f8b204816248d53.tar.xz |
wallet-core: fix withdrawal amount check
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/withdraw.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts index 083fa2a2d..3e2f4411f 100644 --- a/packages/taler-wallet-core/src/withdraw.ts +++ b/packages/taler-wallet-core/src/withdraw.ts @@ -3323,7 +3323,10 @@ export async function acceptWithdrawalFromUri( if (req.amount == null) { amount = p.info.amount; } else { - if (!p.info.editableAmount) { + if ( + Amounts.cmp(p.info.amount, req.amount) != 0 && + !p.info.editableAmount + ) { throw Error( `mismatched amount, amount is fixed by bank (${p.info.amount}) but client provided different amount (${req.amount})`, ); |