mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
User token swap improvements (#2470)
* Handle null currency in trade * Improve trade network handling and error reporting * update Polygon network tag * Update exchange_trade_view_model.dart * handle nullable network fields * Update lib/exchange/provider/letsexchange_exchange_provider.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -287,6 +287,12 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
|
||||
return CryptoCurrency._rawCurrencyMap[raw]!;
|
||||
}
|
||||
|
||||
static CryptoCurrency? safeDeserialize({int? raw}) {
|
||||
if (raw == null || raw < 0) return null;
|
||||
return _rawCurrencyMap[raw];
|
||||
}
|
||||
|
||||
|
||||
// TODO: refactor this
|
||||
static CryptoCurrency fromString(String name, {CryptoCurrency? walletCurrency}) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user