diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 3d076f6e9..da9b7f9e9 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -66,6 +66,7 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen CryptoCurrency.scrt, CryptoCurrency.uni, CryptoCurrency.stx, + CryptoCurrency.btcln, ]; static const havenCurrencies = [ @@ -150,6 +151,8 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen static const scrt = CryptoCurrency(title: 'SCRT', fullName: 'Secret Network', raw: 59, name: 'scrt', iconPath: 'assets/images/scrt_icon.png'); static const uni = CryptoCurrency(title: 'UNI', tag: 'ETH', fullName: 'Uniswap', raw: 60, name: 'uni', iconPath: 'assets/images/uni_icon.png'); static const stx = CryptoCurrency(title: 'STX', fullName: 'Stacks', raw: 61, name: 'stx', iconPath: 'assets/images/stx_icon.png'); + static const btcln = CryptoCurrency(title: 'BTC', tag: 'LN', fullName: 'Bitcoin Lightning Network', raw: 62, name: 'btcln', iconPath: 'assets/images/btc.png'); + static final Map _rawCurrencyMap = [...all, ...havenCurrencies].fold>({}, (acc, item) { diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 22ad6a9d8..0bed0611c 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -85,6 +85,8 @@ class AddressValidator extends TextValidator { return 'R[0-9a-zA-Z]{33}'; case CryptoCurrency.pivx: return 'D([1-9a-km-zA-HJ-NP-Z]){33}'; + case CryptoCurrency.btcln: + return '^(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)'; default: return '[0-9a-zA-Z]'; } @@ -194,6 +196,8 @@ class AddressValidator extends TextValidator { return [45]; case CryptoCurrency.near: return [64]; + case CryptoCurrency.btcln: + return null; default: return []; } diff --git a/lib/exchange/sideshift/sideshift_exchange_provider.dart b/lib/exchange/sideshift/sideshift_exchange_provider.dart index 2fc593988..a5b0c990f 100644 --- a/lib/exchange/sideshift/sideshift_exchange_provider.dart +++ b/lib/exchange/sideshift/sideshift_exchange_provider.dart @@ -29,9 +29,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { CryptoCurrency.dcr, CryptoCurrency.kmd, CryptoCurrency.mkr, - CryptoCurrency.near, CryptoCurrency.oxt, - CryptoCurrency.paxg, CryptoCurrency.pivx, CryptoCurrency.rune, CryptoCurrency.rvn, @@ -300,6 +298,8 @@ class SideShiftExchangeProvider extends ExchangeProvider { return 'usdcsol'; case CryptoCurrency.maticpoly: return 'polygon'; + case CryptoCurrency.btcln: + return 'ln'; default: return currency.title.toLowerCase(); } diff --git a/lib/exchange/trocador/trocador_exchange_provider.dart b/lib/exchange/trocador/trocador_exchange_provider.dart index 39b4638f4..fb6109bdf 100644 --- a/lib/exchange/trocador/trocador_exchange_provider.dart +++ b/lib/exchange/trocador/trocador_exchange_provider.dart @@ -285,6 +285,8 @@ class TrocadorExchangeProvider extends ExchangeProvider { return 'ERC20'; case 'TRX': return 'TRC20'; + case 'LN': + return 'Lightning'; default: return tag.toLowerCase(); }