CW-306 New assets for exchange and cleanup (#993)

* CW-306 New assets for exchange and cleanup

* Remove 1inch
This commit is contained in:
Justin Ehrenhofer
2023-07-13 17:31:45 +03:00
committed by GitHub
parent ff420c7c7e
commit d7fa9991e1
41 changed files with 112 additions and 31 deletions
+52 -17
View File
@@ -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:
@@ -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 = [