diff --git a/cw_core/lib/parse_fixed.dart b/cw_core/lib/parse_fixed.dart index 1323b6c76..695bad60f 100644 --- a/cw_core/lib/parse_fixed.dart +++ b/cw_core/lib/parse_fixed.dart @@ -45,8 +45,7 @@ BigInt parseFixed(String value, int decimals) { var fraction = (comps.length == 2 ? comps[1] : "0").padRight(decimals, "0"); if (fraction.length > multiplier.length - 1) { - throw FormatException( - "fractional component exceeds decimals, underflow, parseFixed"); + throw FormatException("fractional component exceeds decimals, underflow, parseFixed"); } final wholeValue = BigInt.parse(whole); diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index defdd8316..df83af02a 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -763,7 +763,7 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with if (price == null || price == 0.0) return; final crypto = _enteredAmount / price; - final depositAmountTmp = crypto.toString().withMaxDecimals(receiveCurrency.decimals); + final depositAmountTmp = crypto.toString().withMaxDecimals(depositCurrency.decimals); if (_depositAmount != depositAmountTmp) { changeDepositAmount(amount: depositAmountTmp, isCanonical: true); }