summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-28 16:11:58 +0200
committerFlorian Dold <florian@dold.me>2022-03-28 16:11:58 +0200
commit2ba6692c6ad97285e852fb0b74a650e067817003 (patch)
tree2018071064c002f63aaed1928a0e0483830c6494 /packages/taler-wallet-webextension/src/cta
parente89821a6c7f5b740ab5781354149dd2cc2b4047c (diff)
downloadwallet-core-2ba6692c6ad97285e852fb0b74a650e067817003.tar.gz
wallet-core-2ba6692c6ad97285e852fb0b74a650e067817003.tar.bz2
wallet-core-2ba6692c6ad97285e852fb0b74a650e067817003.zip
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.
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Withdraw.tsx7
1 files changed, 6 insertions, 1 deletions
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 (
<View
onWithdraw={onWithdraw}
amount={withdrawAmount}
exchangeBaseUrl={exchange}
- withdrawalFee={details.info.withdrawFee} //FIXME
+ withdrawalFee={withdrawalFee}
terms={detailsHook.response.tos}
onSwitchExchange={setCustomExchange}
knownExchanges={knownExchanges}