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

This commit is contained in:
Florian Dold 2023-02-20 04:00:46 +01:00
parent a6d78f12df
commit 2626ed6ad0
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -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,
};
}