diff options
author | Sebastian <sebasjm@gmail.com> | 2023-01-20 15:44:53 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-01-20 15:45:02 -0300 |
commit | 03b12d2b27e9d4038e2b02b303a0401160ebc632 (patch) | |
tree | 2ea4f87a03ffc955ebeaf090d7ed6316c5c006f2 /packages/taler-wallet-webextension/src/cta/Withdraw | |
parent | 5f31dad2d3af80ab0f53cc52a8740f9a37ca0e75 (diff) | |
download | wallet-core-03b12d2b27e9d4038e2b02b303a0401160ebc632.tar.xz |
fix wrong fee calculation
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx index 1cc87547e..4fb65f06c 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { ExchangeTosStatus } from "@gnu-taler/taler-util"; +import { Amounts, ExchangeTosStatus } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { Amount } from "../../components/Amount.js"; @@ -26,7 +26,11 @@ import { TermsOfService } from "../../components/TermsOfService/index.js"; import { useTranslationContext } from "../../context/translation.js"; import { Button } from "../../mui/Button.js"; import editIcon from "../../svg/edit_24px.svg"; -import { ExchangeDetails, WithdrawDetails } from "../../wallet/Transaction.js"; +import { + ExchangeDetails, + getAmountWithFee, + WithdrawDetails, +} from "../../wallet/Transaction.js"; import { State } from "./index.js"; export function SuccessView(state: State.Success): VNode { @@ -64,10 +68,11 @@ export function SuccessView(state: State.Success): VNode { title={i18n.str`Details`} text={ <WithdrawDetails - amount={{ - effective: state.toBeReceived, - raw: state.chosenAmount, - }} + amount={getAmountWithFee( + state.toBeReceived, + state.chosenAmount, + "credit", + )} /> } /> |