parse instead of fromFloat

This commit is contained in:
Sebastian 2023-06-20 11:49:16 -03:00
parent 1f60ac76f9
commit ac9b4bfd0e
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069

View File

@ -249,7 +249,9 @@ function CreateCashout({
const sellRate = config.ratios_and_fees.sell_at_ratio; const sellRate = config.ratios_and_fees.sell_at_ratio;
const sellFee = !config.ratios_and_fees.sell_out_fee const sellFee = !config.ratios_and_fees.sell_out_fee
? zero ? 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; const fiatCurrency = config.fiat_currency;
if (!sellRate || sellRate < 0) return <div>error rate</div>; if (!sellRate || sellRate < 0) return <div>error rate</div>;