prevent trade.from saving as null + fallback when it does (#3346)

This commit is contained in:
malik1004x
2026-06-25 13:05:05 +03:00
committed by GitHub
parent d3a1464775
commit eaa8338a52
5 changed files with 28 additions and 16 deletions
@@ -1242,6 +1242,12 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
trade.walletId = wallet.id;
trade.chainId = wallet.chainId;
trade.fromWalletAddress = wallet.walletAddresses.address;
if(trade.from == null) {
trade.from = depositCurrency;
}
if(trade.to == null) {
trade.to = receiveCurrency;
}
final canCreateTrade = await isCanCreateTrade(trade);
if (!canCreateTrade.result) {