Skip to content

Commit

Permalink
Merge branch 'main' into october
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 authored Aug 21, 2024
2 parents 27824b3 + 6fa1c5a commit 97940e6
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
81 changes: 81 additions & 0 deletions lib/app/shared/constants/parameters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ class TokensCubit extends Cubit<TokensState> {
if (offset == 0) {
final ethereumBaseToken = await _getBaseTokenBalanceOnEtherlink(
walletAddress,

ethereumNetwork,
);

Expand All @@ -182,10 +183,12 @@ class TokensCubit extends Cubit<TokensState> {
}
data = newData;


if (data.length == 1) {
final emptyTokens = await getSomeEmptyCoins(ethereumNetwork.type);
data.addAll(emptyTokens);
}

} else {
data.addAll(newData);
}
Expand Down Expand Up @@ -524,6 +527,7 @@ class TokensCubit extends Cubit<TokensState> {

Future<TokenModel?> _getBaseTokenBalanceOnEtherlink(
String walletAddress,

EthereumNetwork ethereumNetwork,
) async {
try {
Expand All @@ -544,6 +548,7 @@ class TokensCubit extends Cubit<TokensState> {
standard: 'ERC20',
decimalsToShow: 5,
);

} catch (e, s) {
getLogger(toString()).e('error: $e, stack: $s');
return null;
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 97940e6

Please sign in to comment.