mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
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:
co-authored by
Serhii-Borodenko
Omar Hatem
parent
da478b5421
commit
bad88e9ce1
@@ -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 (_) {}
|
||||
|
||||
Reference in New Issue
Block a user