mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 17:40:43 +00:00
Add btcln; add 2 assets to SideShift (#890)
* Add btcln; add 2 assets to SideShift * fix regex line * change ordering
This commit is contained in:
parent
8f16af4748
commit
ab20312e61
4 changed files with 11 additions and 2 deletions
|
@ -66,6 +66,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
|
||||||
CryptoCurrency.scrt,
|
CryptoCurrency.scrt,
|
||||||
CryptoCurrency.uni,
|
CryptoCurrency.uni,
|
||||||
CryptoCurrency.stx,
|
CryptoCurrency.stx,
|
||||||
|
CryptoCurrency.btcln,
|
||||||
];
|
];
|
||||||
|
|
||||||
static const havenCurrencies = [
|
static const havenCurrencies = [
|
||||||
|
@ -150,6 +151,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
|
||||||
static const scrt = CryptoCurrency(title: 'SCRT', fullName: 'Secret Network', raw: 59, name: 'scrt', iconPath: 'assets/images/scrt_icon.png');
|
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 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 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<int, CryptoCurrency> _rawCurrencyMap =
|
static final Map<int, CryptoCurrency> _rawCurrencyMap =
|
||||||
[...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) {
|
[...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) {
|
||||||
|
|
|
@ -85,6 +85,8 @@ class AddressValidator extends TextValidator {
|
||||||
return 'R[0-9a-zA-Z]{33}';
|
return 'R[0-9a-zA-Z]{33}';
|
||||||
case CryptoCurrency.pivx:
|
case CryptoCurrency.pivx:
|
||||||
return 'D([1-9a-km-zA-HJ-NP-Z]){33}';
|
return 'D([1-9a-km-zA-HJ-NP-Z]){33}';
|
||||||
|
case CryptoCurrency.btcln:
|
||||||
|
return '^(lnbc|LNBC)([0-9]{1,}[a-zA-Z0-9]+)';
|
||||||
default:
|
default:
|
||||||
return '[0-9a-zA-Z]';
|
return '[0-9a-zA-Z]';
|
||||||
}
|
}
|
||||||
|
@ -194,6 +196,8 @@ class AddressValidator extends TextValidator {
|
||||||
return [45];
|
return [45];
|
||||||
case CryptoCurrency.near:
|
case CryptoCurrency.near:
|
||||||
return [64];
|
return [64];
|
||||||
|
case CryptoCurrency.btcln:
|
||||||
|
return null;
|
||||||
default:
|
default:
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,7 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
CryptoCurrency.dcr,
|
CryptoCurrency.dcr,
|
||||||
CryptoCurrency.kmd,
|
CryptoCurrency.kmd,
|
||||||
CryptoCurrency.mkr,
|
CryptoCurrency.mkr,
|
||||||
CryptoCurrency.near,
|
|
||||||
CryptoCurrency.oxt,
|
CryptoCurrency.oxt,
|
||||||
CryptoCurrency.paxg,
|
|
||||||
CryptoCurrency.pivx,
|
CryptoCurrency.pivx,
|
||||||
CryptoCurrency.rune,
|
CryptoCurrency.rune,
|
||||||
CryptoCurrency.rvn,
|
CryptoCurrency.rvn,
|
||||||
|
@ -300,6 +298,8 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
return 'usdcsol';
|
return 'usdcsol';
|
||||||
case CryptoCurrency.maticpoly:
|
case CryptoCurrency.maticpoly:
|
||||||
return 'polygon';
|
return 'polygon';
|
||||||
|
case CryptoCurrency.btcln:
|
||||||
|
return 'ln';
|
||||||
default:
|
default:
|
||||||
return currency.title.toLowerCase();
|
return currency.title.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,6 +285,8 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
||||||
return 'ERC20';
|
return 'ERC20';
|
||||||
case 'TRX':
|
case 'TRX':
|
||||||
return 'TRC20';
|
return 'TRC20';
|
||||||
|
case 'LN':
|
||||||
|
return 'Lightning';
|
||||||
default:
|
default:
|
||||||
return tag.toLowerCase();
|
return tag.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue