aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-06-30 19:20:54 +0200
committerFlorian Dold <florian@dold.me>2024-06-30 19:20:54 +0200
commit93283808cfef9a947e62cf136f8b204816248d53 (patch)
tree5988743755df3c0da97c220a27b78704f745083a /packages/taler-wallet-core/src
parent1bf9dafb3733baaff50b34a668f5ae1f1b503252 (diff)
downloadwallet-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.ts5
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})`,
);