commit 93283808cfef9a947e62cf136f8b204816248d53
parent 1bf9dafb3733baaff50b34a668f5ae1f1b503252
Author: Florian Dold <florian@dold.me>
Date: Sun, 30 Jun 2024 19:20:54 +0200
wallet-core: fix withdrawal amount check
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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})`,
);