taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 2626ed6ad00234fe44c8bd54c53c2275b6545f62
parent a6d78f12df0bf42838f424e889f376ca19bfd96c
Author: Florian Dold <florian@dold.me>
Date:   Mon, 20 Feb 2023 04:00:46 +0100

wallet-core: correct raw/effective amounts for check-peer-pull-credit

Diffstat:
Mpackages/taler-wallet-core/src/operations/pay-peer.ts | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 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, }; }