diff --git a/assets/images/aave_icon.png b/assets/images/aave_icon.png new file mode 100644 index 000000000..5f79393c2 Binary files /dev/null and b/assets/images/aave_icon.png differ diff --git a/assets/images/arb_icon.png b/assets/images/arb_icon.png new file mode 100644 index 000000000..a9cc4798f Binary files /dev/null and b/assets/images/arb_icon.png differ diff --git a/assets/images/bat_icon.png b/assets/images/bat_icon.png new file mode 100644 index 000000000..d4f6ff492 Binary files /dev/null and b/assets/images/bat_icon.png differ diff --git a/assets/images/bttbsc_icon.png b/assets/images/bttbsc_icon.png deleted file mode 100644 index 253c01d1c..000000000 Binary files a/assets/images/bttbsc_icon.png and /dev/null differ diff --git a/assets/images/cake_icon.png b/assets/images/cake_icon.png new file mode 100644 index 000000000..cfa56cf0f Binary files /dev/null and b/assets/images/cake_icon.png differ diff --git a/assets/images/china.png b/assets/images/china.png deleted file mode 100644 index 0771ff1e0..000000000 Binary files a/assets/images/china.png and /dev/null differ diff --git a/assets/images/comp_icon.png b/assets/images/comp_icon.png new file mode 100644 index 000000000..620e4a4f7 Binary files /dev/null and b/assets/images/comp_icon.png differ diff --git a/assets/images/cro_icon.png b/assets/images/cro_icon.png new file mode 100644 index 000000000..db6367005 Binary files /dev/null and b/assets/images/cro_icon.png differ diff --git a/assets/images/dydx_icon.png b/assets/images/dydx_icon.png new file mode 100644 index 000000000..bc9b0e142 Binary files /dev/null and b/assets/images/dydx_icon.png differ diff --git a/assets/images/ens_icon.png b/assets/images/ens_icon.png new file mode 100644 index 000000000..fb9f8ba56 Binary files /dev/null and b/assets/images/ens_icon.png differ diff --git a/assets/images/france.png b/assets/images/france.png deleted file mode 100644 index 57b98bc32..000000000 Binary files a/assets/images/france.png and /dev/null differ diff --git a/assets/images/frax_icon.png b/assets/images/frax_icon.png new file mode 100644 index 000000000..81ca4269b Binary files /dev/null and b/assets/images/frax_icon.png differ diff --git a/assets/images/ftm_icon.png b/assets/images/ftm_icon.png new file mode 100644 index 000000000..6343be6ec Binary files /dev/null and b/assets/images/ftm_icon.png differ diff --git a/assets/images/germany.png b/assets/images/germany.png deleted file mode 100644 index 2dc720303..000000000 Binary files a/assets/images/germany.png and /dev/null differ diff --git a/assets/images/grt_icon.png b/assets/images/grt_icon.png new file mode 100644 index 000000000..5631a4159 Binary files /dev/null and b/assets/images/grt_icon.png differ diff --git a/assets/images/gtc_icon.png b/assets/images/gtc_icon.png new file mode 100644 index 000000000..e6bdad8f1 Binary files /dev/null and b/assets/images/gtc_icon.png differ diff --git a/assets/images/gusd_icon.png b/assets/images/gusd_icon.png new file mode 100644 index 000000000..247bfb315 Binary files /dev/null and b/assets/images/gusd_icon.png differ diff --git a/assets/images/holland.png b/assets/images/holland.png deleted file mode 100644 index e753b98cf..000000000 Binary files a/assets/images/holland.png and /dev/null differ diff --git a/assets/images/india.png b/assets/images/india.png deleted file mode 100644 index e6002f546..000000000 Binary files a/assets/images/india.png and /dev/null differ diff --git a/assets/images/italy.png b/assets/images/italy.png deleted file mode 100644 index 616fa97d8..000000000 Binary files a/assets/images/italy.png and /dev/null differ diff --git a/assets/images/japan.png b/assets/images/japan.png deleted file mode 100644 index 2295c0dfa..000000000 Binary files a/assets/images/japan.png and /dev/null differ diff --git a/assets/images/ldo_icon.png b/assets/images/ldo_icon.png new file mode 100644 index 000000000..d614bd48b Binary files /dev/null and b/assets/images/ldo_icon.png differ diff --git a/assets/images/nexo_icon.png b/assets/images/nexo_icon.png new file mode 100644 index 000000000..754a3f995 Binary files /dev/null and b/assets/images/nexo_icon.png differ diff --git a/assets/images/pepe_icon.png b/assets/images/pepe_icon.png new file mode 100644 index 000000000..24c19cc3d Binary files /dev/null and b/assets/images/pepe_icon.png differ diff --git a/assets/images/poland.png b/assets/images/poland.png deleted file mode 100644 index fc8f2e163..000000000 Binary files a/assets/images/poland.png and /dev/null differ diff --git a/assets/images/portugal.png b/assets/images/portugal.png deleted file mode 100644 index d0f1a4917..000000000 Binary files a/assets/images/portugal.png and /dev/null differ diff --git a/assets/images/russia.png b/assets/images/russia.png deleted file mode 100644 index 8b4752cb7..000000000 Binary files a/assets/images/russia.png and /dev/null differ diff --git a/assets/images/south_korea.png b/assets/images/south_korea.png deleted file mode 100644 index 49e16e484..000000000 Binary files a/assets/images/south_korea.png and /dev/null differ diff --git a/assets/images/spain.png b/assets/images/spain.png deleted file mode 100644 index 6b806b016..000000000 Binary files a/assets/images/spain.png and /dev/null differ diff --git a/assets/images/steth_icon.png b/assets/images/steth_icon.png new file mode 100644 index 000000000..6336e414b Binary files /dev/null and b/assets/images/steth_icon.png differ diff --git a/assets/images/storj_icon.png b/assets/images/storj_icon.png new file mode 100644 index 000000000..c67e10f98 Binary files /dev/null and b/assets/images/storj_icon.png differ diff --git a/assets/images/tusd_icon.png b/assets/images/tusd_icon.png new file mode 100644 index 000000000..9a5189481 Binary files /dev/null and b/assets/images/tusd_icon.png differ diff --git a/assets/images/usa.png b/assets/images/usa.png deleted file mode 100644 index d67d3e2b4..000000000 Binary files a/assets/images/usa.png and /dev/null differ diff --git a/assets/images/usdcsol_icon.png b/assets/images/usdcsol_icon.png deleted file mode 100644 index 283533b42..000000000 Binary files a/assets/images/usdcsol_icon.png and /dev/null differ diff --git a/assets/images/wbtc_icon.png b/assets/images/wbtc_icon.png new file mode 100644 index 000000000..d836eb391 Binary files /dev/null and b/assets/images/wbtc_icon.png differ diff --git a/assets/images/weth_icon.png b/assets/images/weth_icon.png new file mode 100644 index 000000000..e63222277 Binary files /dev/null and b/assets/images/weth_icon.png differ diff --git a/assets/images/zaddr_icon.png b/assets/images/zaddr_icon.png deleted file mode 100644 index 095ad2c56..000000000 Binary files a/assets/images/zaddr_icon.png and /dev/null differ diff --git a/assets/images/zrx_icon.png b/assets/images/zrx_icon.png new file mode 100644 index 000000000..fcf1a1515 Binary files /dev/null and b/assets/images/zrx_icon.png differ diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index da9b7f9e9..9d586c85b 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -67,6 +67,29 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen CryptoCurrency.uni, CryptoCurrency.stx, CryptoCurrency.btcln, + CryptoCurrency.shib, + CryptoCurrency.aave, + CryptoCurrency.arb, + CryptoCurrency.bat, + CryptoCurrency.comp, + CryptoCurrency.cro, + CryptoCurrency.ens, + CryptoCurrency.ftm, + CryptoCurrency.frax, + CryptoCurrency.gusd, + CryptoCurrency.gtc, + CryptoCurrency.grt, + CryptoCurrency.ldo, + CryptoCurrency.nexo, + CryptoCurrency.cake, + CryptoCurrency.pepe, + CryptoCurrency.storj, + CryptoCurrency.tusd, + CryptoCurrency.wbtc, + CryptoCurrency.weth, + CryptoCurrency.zrx, + CryptoCurrency.dydx, + CryptoCurrency.steth, ]; static const havenCurrencies = [ @@ -121,7 +144,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen static const ape = CryptoCurrency(title: 'APE', tag: 'ETH', fullName: 'ApeCoin', raw: 30, name: 'ape', iconPath: 'assets/images/ape_icon.png'); static const avaxc = CryptoCurrency(title: 'AVAX', tag: 'AVAXC', raw: 31, name: 'avaxc', iconPath: 'assets/images/avaxc_icon.png'); static const btt = CryptoCurrency(title: 'BTT', tag: 'ETH', fullName: 'BitTorrent', raw: 32, name: 'btt', iconPath: 'assets/images/btt_icon.png'); - static const bttc = CryptoCurrency(title: 'BTTC', tag: 'TRX', fullName: 'BitTorrent-NEW', raw: 33, name: 'bttc', iconPath: 'assets/images/bttbsc_icon.png'); + static const bttc = CryptoCurrency(title: 'BTTC', tag: 'TRX', fullName: 'BitTorrent-NEW', raw: 33, name: 'bttc', iconPath: 'assets/images/btt_icon.png'); static const doge = CryptoCurrency(title: 'DOGE', fullName: 'Dogecoin', raw: 34, name: 'doge', iconPath: 'assets/images/doge_icon.png'); static const firo = CryptoCurrency(title: 'FIRO', raw: 35, name: 'firo', iconPath: 'assets/images/firo_icon.png'); static const usdttrc20 = CryptoCurrency(title: 'USDT', tag: 'TRX', fullName: 'USDT Tether', raw: 36, name: 'usdttrc20', iconPath: 'assets/images/usdttrc20_icon.png'); @@ -129,9 +152,9 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen static const sc = CryptoCurrency(title: 'SC', fullName: 'Siacoin', raw: 38, name: 'sc', iconPath: 'assets/images/sc_icon.png'); static const sol = CryptoCurrency(title: 'SOL', fullName: 'Solana', raw: 39, name: 'sol', iconPath: 'assets/images/sol_icon.png'); static const usdc = CryptoCurrency(title: 'USDC', tag: 'ETH', fullName: 'USD Coin', raw: 40, name: 'usdc', iconPath: 'assets/images/usdc_icon.png'); - static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/usdcsol_icon.png'); - static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', fullName: 'Shielded Zcash', iconPath: 'assets/images/zaddr_icon.png', raw: 42, name: 'zaddr'); - static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', fullName: 'Transparent Zcash', iconPath: 'assets/images/zec_icon.png', raw: 43, name: 'zec'); + static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/usdc_icon.png'); + static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', fullName: 'Shielded Zcash', raw: 42, name: 'zaddr', iconPath: 'assets/images/zec_icon.png'); + static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', fullName: 'Transparent Zcash', raw: 43, name: 'zec', iconPath: 'assets/images/zec_icon.png'); static const zen = CryptoCurrency(title: 'ZEN', fullName: 'Horizen', raw: 44, name: 'zen', iconPath: 'assets/images/zen_icon.png'); static const xvg = CryptoCurrency(title: 'XVG', fullName: 'Verge', raw: 45, name: 'xvg', iconPath: 'assets/images/xvg_icon.png'); @@ -152,6 +175,29 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen 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 const shib = CryptoCurrency(title: 'SHIB', tag: 'ETH', fullName: 'Shiba Inu', raw: 63, name: 'shib', iconPath: 'assets/images/shib_icon.png'); + static const aave = CryptoCurrency(title: 'AAVE', tag: 'ETH', fullName: 'Aave', raw: 64, name: 'aave', iconPath: 'assets/images/aave_icon.png'); + static const arb = CryptoCurrency(title: 'ARB', fullName: 'Arbitrum', raw: 65, name: 'arb', iconPath: 'assets/images/arb_icon.png'); + static const bat = CryptoCurrency(title: 'BAT', tag: 'ETH', fullName: 'Basic Attention Token', raw: 66, name: 'bat', iconPath: 'assets/images/bat_icon.png'); + static const comp = CryptoCurrency(title: 'COMP', tag: 'ETH', fullName: 'Compound', raw: 67, name: 'comp', iconPath: 'assets/images/comp_icon.png'); + static const cro = CryptoCurrency(title: 'CRO', tag: 'ETH', fullName: 'Crypto.com Cronos', raw: 68, name: 'cro', iconPath: 'assets/images/cro_icon.png'); + static const ens = CryptoCurrency(title: 'ENS', tag: 'ETH', fullName: 'Ethereum Name Service', raw: 69, name: 'ens', iconPath: 'assets/images/ens_icon.png'); + static const ftm = CryptoCurrency(title: 'FTM', tag: 'ETH', fullName: 'Fantom', raw: 70, name: 'ftm', iconPath: 'assets/images/ftm_icon.png'); + static const frax = CryptoCurrency(title: 'FRAX', tag: 'ETH', fullName: 'Frax', raw: 71, name: 'frax', iconPath: 'assets/images/frax_icon.png'); + static const gusd = CryptoCurrency(title: 'GUSD', tag: 'ETH', fullName: 'Gemini USD', raw: 72, name: 'gusd', iconPath: 'assets/images/gusd_icon.png'); + static const gtc = CryptoCurrency(title: 'GTC', tag: 'ETH', fullName: 'Gitcoin', raw: 73, name: 'gtc', iconPath: 'assets/images/gtc_icon.png'); + static const grt = CryptoCurrency(title: 'GRT', tag: 'ETH', fullName: 'The Graph', raw: 74, name: 'grt', iconPath: 'assets/images/grt_icon.png'); + static const ldo = CryptoCurrency(title: 'LDO', tag: 'ETH', fullName: 'Lido DAO', raw: 75, name: 'ldo', iconPath: 'assets/images/ldo_icon.png'); + static const nexo = CryptoCurrency(title: 'NEXO', tag: 'ETH', fullName: 'Nexo', raw: 76, name: 'nexo', iconPath: 'assets/images/nexo_icon.png'); + static const cake = CryptoCurrency(title: 'CAKE', tag: 'BSC', fullName: 'PancakeSwap', raw: 77, name: 'cake', iconPath: 'assets/images/cake_icon.png'); + static const pepe = CryptoCurrency(title: 'PEPE', tag: 'ETH', fullName: 'Pepe', raw: 78, name: 'pepe', iconPath: 'assets/images/pepe_icon.png'); + static const storj = CryptoCurrency(title: 'STORJ', tag: 'ETH', fullName: 'Storj', raw: 79, name: 'storj', iconPath: 'assets/images/stroj_icon.png'); + static const tusd = CryptoCurrency(title: 'TUSD', tag: 'ETH', fullName: 'TrueUSD', raw: 80, name: 'tusd', iconPath: 'assets/images/tusd_icon.png'); + static const wbtc = CryptoCurrency(title: 'WBTC', tag: 'ETH', fullName: 'Wrapped Bitcoin', raw: 81, name: 'wbtc', iconPath: 'assets/images/wbtc_icon.png'); + static const weth = CryptoCurrency(title: 'WETH', tag: 'ETH', fullName: 'Wrapped Ethereum', raw: 82, name: 'weth', iconPath: 'assets/images/weth_icon.png'); + static const zrx = CryptoCurrency(title: 'ZRX', tag: 'ETH', fullName: '0x Protocol', raw: 83, name: 'zrx', iconPath: 'assets/images/zrx_icon.png'); + static const dydx = CryptoCurrency(title: 'DYDX', tag: 'ETH', fullName: 'dYdX', raw: 84, name: 'dydx', iconPath: 'assets/images/dydx_icon.png'); + static const steth = CryptoCurrency(title: 'STETH', tag: 'ETH', fullName: 'Lido Staked Ethereum', raw: 85, name: 'steth', iconPath: 'assets/images/steth_icon.png'); static final Map<int, CryptoCurrency> _rawCurrencyMap = diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 064efa11b..2b3056343 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -36,6 +36,26 @@ class AddressValidator extends TextValidator { case CryptoCurrency.oxt: case CryptoCurrency.paxg: case CryptoCurrency.uni: + case CryptoCurrency.aave: + case CryptoCurrency.bat: + case CryptoCurrency.comp: + case CryptoCurrency.cro: + case CryptoCurrency.ens: + case CryptoCurrency.ftm: + case CryptoCurrency.frax: + case CryptoCurrency.gusd: + case CryptoCurrency.gtc: + case CryptoCurrency.grt: + case CryptoCurrency.ldo: + case CryptoCurrency.nexo: + case CryptoCurrency.pepe: + case CryptoCurrency.storj: + case CryptoCurrency.tusd: + case CryptoCurrency.wbtc: + case CryptoCurrency.weth: + case CryptoCurrency.zrx: + case CryptoCurrency.dydx: + case CryptoCurrency.steth: return '0x[0-9a-zA-Z]'; case CryptoCurrency.xrp: return '^[0-9a-zA-Z]{34}\$|^X[0-9a-zA-Z]{46}\$'; @@ -101,8 +121,6 @@ class AddressValidator extends TextValidator { return null; case CryptoCurrency.ada: return null; - case CryptoCurrency.ape: - return [42]; case CryptoCurrency.avaxc: return [42]; case CryptoCurrency.bch: @@ -111,13 +129,43 @@ class AddressValidator extends TextValidator { return [42]; case CryptoCurrency.btc: return null; - case CryptoCurrency.dai: - return [42]; case CryptoCurrency.dash: return [34]; case CryptoCurrency.eos: return [42]; case CryptoCurrency.eth: + case CryptoCurrency.usdcpoly: + case CryptoCurrency.mana: + case CryptoCurrency.matic: + case CryptoCurrency.maticpoly: + case CryptoCurrency.mkr: + case CryptoCurrency.oxt: + case CryptoCurrency.paxg: + case CryptoCurrency.uni: + case CryptoCurrency.dai: + case CryptoCurrency.ape: + case CryptoCurrency.usdc: + case CryptoCurrency.usdterc20: + case CryptoCurrency.aave: + case CryptoCurrency.bat: + case CryptoCurrency.comp: + case CryptoCurrency.cro: + case CryptoCurrency.ens: + case CryptoCurrency.ftm: + case CryptoCurrency.frax: + case CryptoCurrency.gusd: + case CryptoCurrency.gtc: + case CryptoCurrency.grt: + case CryptoCurrency.ldo: + case CryptoCurrency.nexo: + case CryptoCurrency.pepe: + case CryptoCurrency.storj: + case CryptoCurrency.tusd: + case CryptoCurrency.wbtc: + case CryptoCurrency.weth: + case CryptoCurrency.zrx: + case CryptoCurrency.dydx: + case CryptoCurrency.steth: return [42]; case CryptoCurrency.ltc: return [34, 43, 63]; @@ -129,14 +177,10 @@ class AddressValidator extends TextValidator { return [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]; case CryptoCurrency.trx: return [34]; - case CryptoCurrency.usdc: - return [42]; case CryptoCurrency.usdcsol: return [32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]; case CryptoCurrency.usdt: return [34]; - case CryptoCurrency.usdterc20: - return [42]; case CryptoCurrency.usdttrc20: return [34]; case CryptoCurrency.xlm: @@ -184,15 +228,6 @@ class AddressValidator extends TextValidator { return [35]; case CryptoCurrency.stx: return [40, 41, 42]; - case CryptoCurrency.usdcpoly: - case CryptoCurrency.mana: - case CryptoCurrency.matic: - case CryptoCurrency.maticpoly: - case CryptoCurrency.mkr: - case CryptoCurrency.oxt: - case CryptoCurrency.paxg: - case CryptoCurrency.uni: - return [42]; case CryptoCurrency.rune: return [43]; case CryptoCurrency.scrt: diff --git a/lib/src/screens/seed_language/widgets/seed_language_picker.dart b/lib/src/screens/seed_language/widgets/seed_language_picker.dart index 0aa22088f..742a31e61 100644 --- a/lib/src/screens/seed_language/widgets/seed_language_picker.dart +++ b/lib/src/screens/seed_language/widgets/seed_language_picker.dart @@ -4,16 +4,16 @@ import 'package:flutter/cupertino.dart'; import 'package:cake_wallet/generated/i18n.dart'; List<Image> flagImages = [ - Image.asset('assets/images/usa.png'), - Image.asset('assets/images/china.png'), - Image.asset('assets/images/holland.png'), - Image.asset('assets/images/germany.png'), - Image.asset('assets/images/japan.png'), - Image.asset('assets/images/portugal.png'), - Image.asset('assets/images/russia.png'), - Image.asset('assets/images/spain.png'), - Image.asset('assets/images/france.png'), - Image.asset('assets/images/italy.png'), + Image.asset('assets/images/flags/usa.png'), + Image.asset('assets/images/flags/chn.png'), + Image.asset('assets/images/flags/nld.png'), + Image.asset('assets/images/flags/deu.png'), + Image.asset('assets/images/flags/jpn.png'), + Image.asset('assets/images/flags/prt.png'), + Image.asset('assets/images/flags/rus.png'), + Image.asset('assets/images/flags/esp.png'), + Image.asset('assets/images/flags/fra.png'), + Image.asset('assets/images/flags/ita.png'), ]; const List<String> languageCodes = [