quick fixes for swap logic across providers (#2702)

* fix currency matching and network mapping

* add support for Arbitrum

* Update lib/exchange/provider/exolix_exchange_provider.dart [skip ci]

* Update lib/exchange/provider/exolix_exchange_provider.dart [skip ci]

---------

Co-authored-by: Serhii-Borodenko <17529954+Serhii-Borodenko@users.noreply.github.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Serhii
2025-12-03 23:24:33 +01:00
committed by GitHub
co-authored by Serhii-Borodenko Omar Hatem
parent da478b5421
commit bad88e9ce1
6 changed files with 50 additions and 7 deletions
+11
View File
@@ -357,6 +357,17 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
return null;
}
// Try for native currency with same title and tag
if (tag == null || tag.isEmpty) {
final match = CryptoCurrency.all.firstWhereOrNull(
(e) =>
e.title.toUpperCase() == raw.toUpperCase() && (e.tag == raw.toUpperCase()),
);
if (match != null) return match;
}
try {
return CryptoCurrency.fromString(raw, walletCurrency: walletCurrency);
} catch (_) {}