diff options
author | Sebastian <sebasjm@gmail.com> | 2023-02-18 10:11:23 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-02-18 10:11:23 -0300 |
commit | 0ba479c6e764815f2b4ec48649378cc488140ab6 (patch) | |
tree | d21c10d5b3623df3a0eaeb7596c46acc21c1fca4 /packages/demobank-ui/src/pages | |
parent | a45759e2adfd3bd6955d4135ee5e7ead1eac826c (diff) | |
download | wallet-core-0ba479c6e764815f2b4ec48649378cc488140ab6.tar.xz |
take fiat currency from config
Diffstat (limited to 'packages/demobank-ui/src/pages')
-rw-r--r-- | packages/demobank-ui/src/pages/BusinessAccount.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/demobank-ui/src/pages/BusinessAccount.tsx b/packages/demobank-ui/src/pages/BusinessAccount.tsx index 6651ef0f7..64ec81c2e 100644 --- a/packages/demobank-ui/src/pages/BusinessAccount.tsx +++ b/packages/demobank-ui/src/pages/BusinessAccount.tsx @@ -194,6 +194,7 @@ function CreateCashout({ const sellFee = !config.ratios_and_fees.sell_out_fee ? zero : Amounts.fromFloat(config.ratios_and_fees.sell_out_fee, balance.currency); + const fiatCurrency = config.ratios_and_fees.fiat_currency; if (!sellRate || sellRate < 0) return <div>error rate</div>; @@ -220,7 +221,7 @@ function CreateCashout({ const __amount_credit = Amounts.sub(credit_before_fee, sellFee).amount; const amount_credit = Amounts.parseOrThrow( - `${config.currency}:${Amounts.stringifyValue(__amount_credit)}`, + `${fiatCurrency}:${Amounts.stringifyValue(__amount_credit)}`, ); const balanceAfter = Amounts.sub(balance, amount_debit).amount; @@ -243,8 +244,6 @@ function CreateCashout({ channel: !form.channel ? i18n.str`required` : undefined, }); - // setErrors(validationResult); - return ( <div> {error && ( |