aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-20 04:00:46 +0100
committerFlorian Dold <florian@dold.me>2023-02-20 04:00:46 +0100
commit2626ed6ad00234fe44c8bd54c53c2275b6545f62 (patch)
tree5ff85c1056e588cf67cdad30a35c3595fed85357
parenta6d78f12df0bf42838f424e889f376ca19bfd96c (diff)
wallet-core: correct raw/effective amounts for check-peer-pull-credit
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts
index 6e5f1b89b..ff01342f8 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer.ts
@@ -1425,9 +1425,16 @@ export async function checkPeerPullPaymentInitiation(
throw Error("no exchange found for initiating a peer pull payment");
}
+ const wi = await getExchangeWithdrawalInfo(
+ ws,
+ exchangeUrl,
+ Amounts.parseOrThrow(req.amount),
+ undefined,
+ );
+
return {
exchangeBaseUrl: exchangeUrl,
- amountEffective: req.amount,
+ amountEffective: wi.withdrawalAmountEffective,
amountRaw: req.amount,
};
}