Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/bloc/coins_bloc/asset_coin_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ extension AssetCoinExtension on Asset {
extension CoinTypeExtension on CoinSubClass {
CoinType toCoinType() {
switch (this) {
case CoinSubClass.base:
return CoinType.base20;
case CoinSubClass.ftm20:
return CoinType.ftm20;
case CoinSubClass.arbitrum:
Expand Down Expand Up @@ -112,6 +114,8 @@ extension CoinTypeExtension on CoinSubClass {

bool isEvmProtocol() {
switch (this) {
case CoinSubClass.base:
return true;
case CoinSubClass.avx20:
case CoinSubClass.bep20:
case CoinSubClass.ftm20:
Expand All @@ -137,6 +141,8 @@ extension CoinTypeExtension on CoinSubClass {
extension CoinSubClassExtension on CoinType {
CoinSubClass toCoinSubClass() {
switch (this) {
case CoinType.base20:
return CoinSubClass.base;
case CoinType.ftm20:
return CoinSubClass.ftm20;
case CoinType.arb20:
Expand Down
4 changes: 4 additions & 0 deletions lib/bloc/fiat/base_fiat_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ abstract class BaseFiatProvider {
return 'FTM';
case CoinType.arb20:
return 'ARB';
case CoinType.base20:
return 'BASE';
case CoinType.hrc20:
return 'HARMONY';
case CoinType.plg20:
Expand Down Expand Up @@ -238,6 +240,8 @@ abstract class BaseFiatProvider {
case 'ARBITRUM':
case 'ARB':
return CoinType.arb20;
case 'BASE':
return CoinType.base20;
case 'HARMONY':
return CoinType.hrc20;
case 'MATIC':
Expand Down
1 change: 1 addition & 0 deletions lib/model/coin_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ enum CoinType {
qrc20,
ftm20,
arb20,
base20,
avx20,
hrc20,
mvr20,
Expand Down
4 changes: 4 additions & 0 deletions lib/model/coin_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ String getCoinTypeName(CoinType type, [String? symbol]) {
return 'FTM-20';
case CoinType.arb20:
return 'ARB-20';
case CoinType.base20:
return 'BASE';
case CoinType.etc:
return 'ETC';
case CoinType.avx20:
Expand Down Expand Up @@ -193,6 +195,8 @@ bool isParentCoin(CoinType type, String symbol) {
return symbol == 'FTM';
case CoinType.arb20:
return symbol == 'ETH-ARB20';
case CoinType.base20:
return symbol == 'ETH-BASE';
case CoinType.hrc20:
return symbol == 'ONE';
case CoinType.plg20:
Expand Down
5 changes: 5 additions & 0 deletions lib/shared/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ String abbr2Ticker(String abbr) {
'QRC20',
'FTM20',
'ARB20',
'BASE',
'HRC20',
'MVR20',
'AVX20',
Expand Down Expand Up @@ -407,6 +408,8 @@ Color getProtocolColor(CoinType type) {
return const Color.fromRGBO(25, 105, 255, 1);
case CoinType.arb20:
return const Color.fromRGBO(0, 168, 226, 1);
case CoinType.base20:
return const Color.fromRGBO(0, 168, 226, 1);
case CoinType.hrc20:
return const Color.fromRGBO(29, 195, 219, 1);
case CoinType.etc:
Expand Down Expand Up @@ -450,6 +453,7 @@ bool hasTxHistorySupport(Coin coin) {
case CoinType.qrc20:
case CoinType.ftm20:
case CoinType.arb20:
case CoinType.base20:
case CoinType.etc:
case CoinType.avx20:
case CoinType.mvr20:
Expand Down Expand Up @@ -481,6 +485,7 @@ String getNativeExplorerUrlByCoin(Coin coin, String? address) {
case CoinType.qrc20:
case CoinType.ftm20:
case CoinType.arb20:
case CoinType.base20:
case CoinType.avx20:
case CoinType.mvr20:
case CoinType.hco20:
Expand Down
2 changes: 1 addition & 1 deletion sdk
Submodule sdk updated from 5f7e46 to 3619c1
Loading