From 2ba6692c6ad97285e852fb0b74a650e067817003 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 28 Mar 2022 16:11:58 +0200 Subject: fix fee discrepancy The withdrawal call-to-action and withdrawal transaction details dialog showed different fees, as the "overhead" for unwithdrawable amounts in a reserve was not included in the withdrawal CTA. The withdrawal CTA now shows the same fees as the transaction details. --- packages/taler-wallet-webextension/src/cta/Withdraw.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-webextension/src/cta') diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx index d58e2ec80..bef33dce1 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx @@ -318,12 +318,17 @@ export function WithdrawPageWithParsedURI({ } }; + const withdrawalFee = Amounts.sub( + Amounts.parseOrThrow(details.info.withdrawalAmountRaw), + Amounts.parseOrThrow(details.info.withdrawalAmountEffective), + ).amount; + return (