CW-961-Integrate-xoswap (#2060)

* integrate xoswap

* fix network id

* fix calculating amount with rate twice

* minor: move xoswap a bit up [skip ci]

* minor fix [skip ci]

* add tracking url

* improve fetching exchange rate

* Update trade_filter_store.dart

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
Serhii
2025-03-14 03:02:39 +02:00
committed by GitHub
co-authored by OmarHatem
parent 4f35cc9b0f
commit 1c29be7993
10 changed files with 373 additions and 3 deletions
+15 -3
View File
@@ -20,6 +20,7 @@ abstract class TradeFilterStoreBase with Store {
displayThorChain = true,
displayLetsExchange = true,
displayStealthEx = true,
displayXOSwap = true,
displaySwapTrade = true;
@observable
@@ -45,7 +46,7 @@ abstract class TradeFilterStoreBase with Store {
@observable
bool displayChainflip;
@observable
bool displayThorChain;
@@ -55,6 +56,9 @@ abstract class TradeFilterStoreBase with Store {
@observable
bool displayStealthEx;
@observable
bool displayXOSwap;
@observable
bool displaySwapTrade;
@@ -64,11 +68,12 @@ abstract class TradeFilterStoreBase with Store {
displaySideShift &&
displaySimpleSwap &&
displayTrocador &&
displayExolix &&
displayExolix &&
displayChainflip &&
displayThorChain &&
displayLetsExchange &&
displayStealthEx &&
displayXOSwap &&
displaySwapTrade;
@action
@@ -107,8 +112,12 @@ abstract class TradeFilterStoreBase with Store {
case ExchangeProviderDescription.stealthEx:
displayStealthEx = !displayStealthEx;
break;
case ExchangeProviderDescription.swapTrade:
case ExchangeProviderDescription.xoSwap:
displayXOSwap = !displayXOSwap;
break;
case ExchangeProviderDescription.swapTrade:
displaySwapTrade = !displaySwapTrade;
break;
case ExchangeProviderDescription.all:
if (displayAllTrades) {
displayChangeNow = false;
@@ -122,6 +131,7 @@ abstract class TradeFilterStoreBase with Store {
displayThorChain = false;
displayLetsExchange = false;
displayStealthEx = false;
displayXOSwap = false;
displaySwapTrade = false;
} else {
displayChangeNow = true;
@@ -135,6 +145,7 @@ abstract class TradeFilterStoreBase with Store {
displayThorChain = true;
displayLetsExchange = true;
displayStealthEx = true;
displayXOSwap = true;
displaySwapTrade = true;
}
break;
@@ -168,6 +179,7 @@ abstract class TradeFilterStoreBase with Store {
(displayLetsExchange &&
item.trade.provider == ExchangeProviderDescription.letsExchange) ||
(displayStealthEx && item.trade.provider == ExchangeProviderDescription.stealthEx) ||
(displayXOSwap && item.trade.provider == ExchangeProviderDescription.xoSwap) ||
(displaySwapTrade && item.trade.provider == ExchangeProviderDescription.swapTrade))
.toList()
: _trades;