add fuzzy check to handle some api endpoints that think consistency doesn't matter

This commit is contained in:
julian 2024-07-22 11:35:21 -06:00 committed by julian-CStack
parent a4a7abd6b8
commit 7ccb403ed3

View file

@ -206,7 +206,8 @@ class _StepScaffoldState extends ConsumerState<StepScaffold> {
void sendFromStack() {
final trade = ref.read(desktopExchangeModelProvider)!.trade!;
final address = trade.payInAddress;
final coin = AppConfig.getCryptoCurrencyForTicker(trade.payInCurrency)!;
final coin = AppConfig.getCryptoCurrencyForTicker(trade.payInCurrency) ??
AppConfig.getCryptoCurrencyByPrettyName(trade.payInCurrency);
final amount = Decimal.parse(trade.payInAmount).toAmount(
fractionDigits: coin.fractionDigits,
);