diff --git a/lib/app/shared/constants/parameters.dart b/lib/app/shared/constants/parameters.dart index 20a6eba73..79a5f7f93 100644 --- a/lib/app/shared/constants/parameters.dart +++ b/lib/app/shared/constants/parameters.dart @@ -115,3 +115,84 @@ class Parameters { // ThemeMode.light for talao static const ThemeMode defaultTheme = ThemeMode.dark; } + +final respond = [ + { + "token_instance": { + "is_unique": true, + "id": "431", + "holder_address_hash": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", + "image_url": "example.com/picture.png", + "animation_url": "example.com/video.mp4", + "external_app_url": "d-app.com", + "metadata": { + "year": 2023, + "tags": ["poap", "event"], + "name": "Social Listening Committee #2 Attendees", + "image_url": + "https://assets.poap.xyz/chanel-poap-4c-2023-logo-1675083420470.png", + "home_url": "https://app.poap.xyz/token/6292128", + "external_url": "https://api.poap.tech/metadata/99010/6292128", + "description": + "This is the POAP for attendees of the second Social Listening Committee.", + "attributes": [ + {"value": "01-Feb-2023", "trait_type": "startDate"}, + {"value": "01-Feb-2023", "trait_type": "endDate"}, + {"value": "false", "trait_type": "virtualEvent"}, + {"value": "Paris", "trait_type": "city"}, + {"value": "France", "trait_type": "country"}, + {"value": "https://www.chanel.com", "trait_type": "eventURL"} + ] + }, + "owner": { + "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", + "implementation_name": "implementationName", + "name": "contractName", + "is_contract": true, + "private_tags": [ + { + "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", + "display_name": "name to show", + "label": "label" + } + ], + "watchlist_names": [ + {"display_name": "name to show", "label": "label"} + ], + "public_tags": [ + { + "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", + "display_name": "name to show", + "label": "label" + } + ], + "is_verified": true + }, + "token": { + "circulating_market_cap": "83606435600.3635", + "icon_url": + "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "name": "Tether USD", + "decimals": "6", + "symbol": "USDT", + "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", + "type": "ERC-20", + "holders": "837494234523", + "exchange_rate": "0.99", + "total_supply": "10000000" + } + }, + "value": "10000", + "token_id": "123", + "token": { + "name": "Tether USD", + "decimals": "16", + "symbol": "USDT", + "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", + "type": "ERC-20", + "holders": 837494234523, + "exchange_rate": "0.99", + "total_supply": "10000000" + } + } +]; diff --git a/lib/dashboard/home/tab_bar/tokens/token_page/cubit/tokens_cubit.dart b/lib/dashboard/home/tab_bar/tokens/token_page/cubit/tokens_cubit.dart index 6ab8f7aae..60d776201 100644 --- a/lib/dashboard/home/tab_bar/tokens/token_page/cubit/tokens_cubit.dart +++ b/lib/dashboard/home/tab_bar/tokens/token_page/cubit/tokens_cubit.dart @@ -174,6 +174,7 @@ class TokensCubit extends Cubit { if (offset == 0) { final ethereumBaseToken = await _getBaseTokenBalanceOnEtherlink( walletAddress, + ethereumNetwork, ); @@ -182,10 +183,12 @@ class TokensCubit extends Cubit { } data = newData; + if (data.length == 1) { final emptyTokens = await getSomeEmptyCoins(ethereumNetwork.type); data.addAll(emptyTokens); } + } else { data.addAll(newData); } @@ -524,6 +527,7 @@ class TokensCubit extends Cubit { Future _getBaseTokenBalanceOnEtherlink( String walletAddress, + EthereumNetwork ethereumNetwork, ) async { try { @@ -544,6 +548,7 @@ class TokensCubit extends Cubit { standard: 'ERC20', decimalsToShow: 5, ); + } catch (e, s) { getLogger(toString()).e('error: $e, stack: $s'); return null; diff --git a/pubspec.yaml b/pubspec.yaml index f23785906..3806f02fc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,8 @@ name: altme description: AltMe Flutter App + version: 2.10.10+492 + publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: sdk: ">=3.1.0 <4.0.0"