From cdb65e43c835c8cbfdb7ebbbb9b92cc195202afb Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Sun, 25 Feb 2024 02:14:26 +0200 Subject: [PATCH] Add sending for Solana tokens exchanges --- cw_core/lib/crypto_currency.dart | 1 + lib/view_model/exchange/exchange_trade_view_model.dart | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 67581ecb8..4f622da7d 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -102,6 +102,7 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen CryptoCurrency.usdcEPoly, CryptoCurrency.kaspa, CryptoCurrency.digibyte, + CryptoCurrency.usdtSol, ]; static const havenCurrencies = [ diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index 93877a525..0d40ae240 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -162,9 +162,14 @@ abstract class ExchangeTradeViewModelBase with Store { wallet.currency == CryptoCurrency.maticpoly && tradesStore.trade!.from.tag == CryptoCurrency.maticpoly.tag; + bool _isSplToken() => + wallet.currency == CryptoCurrency.sol && + tradesStore.trade!.from.tag == CryptoCurrency.sol.title; + return tradesStore.trade!.from == wallet.currency || tradesStore.trade!.provider == ExchangeProviderDescription.xmrto || _isEthToken() || - _isPolygonToken(); + _isPolygonToken() || + _isSplToken(); } }