aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-06-20 11:49:16 -0300
committerSebastian <sebasjm@gmail.com>2023-06-20 11:50:33 -0300
commitac9b4bfd0edc8d4f8c396837d2192fb6895e5b29 (patch)
treea89ba72dea7187a13d90ebba2286a5fa787f98a4
parent1f60ac76f920da9c710c4a6116741f4412350f4a (diff)
parse instead of fromFloat
-rw-r--r--packages/demobank-ui/src/pages/BusinessAccount.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/pages/BusinessAccount.tsx b/packages/demobank-ui/src/pages/BusinessAccount.tsx
index d58840cc8..7f69cd9f0 100644
--- a/packages/demobank-ui/src/pages/BusinessAccount.tsx
+++ b/packages/demobank-ui/src/pages/BusinessAccount.tsx
@@ -249,7 +249,9 @@ function CreateCashout({
const sellRate = config.ratios_and_fees.sell_at_ratio;
const sellFee = !config.ratios_and_fees.sell_out_fee
? zero
- : Amounts.fromFloat(config.ratios_and_fees.sell_out_fee, balance.currency);
+ : Amounts.parseOrThrow(
+ `${balance.currency}:${config.ratios_and_fees.sell_out_fee}`,
+ );
const fiatCurrency = config.fiat_currency;
if (!sellRate || sellRate < 0) return <div>error rate</div>;