From 2626ed6ad00234fe44c8bd54c53c2275b6545f62 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 20 Feb 2023 04:00:46 +0100 Subject: wallet-core: correct raw/effective amounts for check-peer-pull-credit --- packages/taler-wallet-core/src/operations/pay-peer.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'packages') 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, }; } -- cgit v1.2.3