mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-24 06:48:38 +02:00
feat: Add warning before adding erc20 token via contract address (#1663)
* feat: Add warning before adding erc20 token via contract address * fix: Update message on edit token page * fix: Adjust polygon secrets variable name * fix: Handle loading state, translate strings and fix other issues * fix linux build [skip ci] * fix: Modify warning text for contract address scam alert * Update secret_key.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
co-authored by
Omar Hatem
parent
0e106834bc
commit
7bf2fb9dce
@@ -0,0 +1,80 @@
|
||||
class Erc20TokenInfoExplorers {
|
||||
String? contractAddress;
|
||||
String? tokenName;
|
||||
String? symbol;
|
||||
String? divisor;
|
||||
String? tokenType;
|
||||
String? totalSupply;
|
||||
String? blueCheckmark;
|
||||
String? description;
|
||||
String? website;
|
||||
String? email;
|
||||
String? blog;
|
||||
String? reddit;
|
||||
String? slack;
|
||||
String? facebook;
|
||||
String? twitter;
|
||||
String? bitcointalk;
|
||||
String? github;
|
||||
String? telegram;
|
||||
String? wechat;
|
||||
String? linkedin;
|
||||
String? discord;
|
||||
String? whitepaper;
|
||||
String? tokenPriceUSD;
|
||||
String? image;
|
||||
|
||||
Erc20TokenInfoExplorers({
|
||||
this.contractAddress,
|
||||
this.tokenName,
|
||||
this.symbol,
|
||||
this.divisor,
|
||||
this.tokenType,
|
||||
this.totalSupply,
|
||||
this.blueCheckmark,
|
||||
this.description,
|
||||
this.website,
|
||||
this.email,
|
||||
this.blog,
|
||||
this.reddit,
|
||||
this.slack,
|
||||
this.facebook,
|
||||
this.twitter,
|
||||
this.bitcointalk,
|
||||
this.github,
|
||||
this.telegram,
|
||||
this.wechat,
|
||||
this.linkedin,
|
||||
this.discord,
|
||||
this.whitepaper,
|
||||
this.tokenPriceUSD,
|
||||
this.image,
|
||||
});
|
||||
|
||||
Erc20TokenInfoExplorers.fromJson(Map<String, dynamic> json) {
|
||||
contractAddress = json['contractAddress'] as String?;
|
||||
tokenName = json['tokenName'] as String?;
|
||||
symbol = json['symbol'] as String?;
|
||||
divisor = json['divisor'] as String?;
|
||||
tokenType = json['tokenType'] as String?;
|
||||
totalSupply = json['totalSupply'] as String?;
|
||||
blueCheckmark = json['blueCheckmark'] as String?;
|
||||
description = json['description'] as String?;
|
||||
website = json['website'] as String?;
|
||||
email = json['email'] as String?;
|
||||
blog = json['blog'] as String?;
|
||||
reddit = json['reddit'] as String?;
|
||||
slack = json['slack'] as String?;
|
||||
facebook = json['facebook'] as String?;
|
||||
twitter = json['twitter'] as String?;
|
||||
bitcointalk = json['bitcointalk'] as String?;
|
||||
github = json['github'] as String?;
|
||||
telegram = json['telegram'] as String?;
|
||||
wechat = json['wechat'] as String?;
|
||||
linkedin = json['linkedin'] as String?;
|
||||
discord = json['discord'] as String?;
|
||||
whitepaper = json['whitepaper'] as String?;
|
||||
tokenPriceUSD = json['tokenPriceUSD'] as String?;
|
||||
image = json['image'] as String?;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
class Erc20TokenInfoMoralis {
|
||||
String? address;
|
||||
String? addressLabel;
|
||||
String? name;
|
||||
String? symbol;
|
||||
String? decimals;
|
||||
String? logo;
|
||||
String? logoHash;
|
||||
String? thumbnail;
|
||||
String? totalSupply;
|
||||
String? totalSupplyFormatted;
|
||||
String? fullyDilutedValuation;
|
||||
String? blockNumber;
|
||||
int? validated;
|
||||
String? createdAt;
|
||||
bool? possibleSpam;
|
||||
bool? verifiedContract;
|
||||
Links? links;
|
||||
int? securityScore;
|
||||
|
||||
Erc20TokenInfoMoralis({
|
||||
this.address,
|
||||
this.addressLabel,
|
||||
this.name,
|
||||
this.symbol,
|
||||
this.decimals,
|
||||
this.logo,
|
||||
this.logoHash,
|
||||
this.thumbnail,
|
||||
this.totalSupply,
|
||||
this.totalSupplyFormatted,
|
||||
this.fullyDilutedValuation,
|
||||
this.blockNumber,
|
||||
this.validated,
|
||||
this.createdAt,
|
||||
this.possibleSpam,
|
||||
this.verifiedContract,
|
||||
this.links,
|
||||
this.securityScore,
|
||||
});
|
||||
|
||||
Erc20TokenInfoMoralis.fromJson(Map<String, dynamic> json) {
|
||||
address = json['address'] as String?;
|
||||
addressLabel = json['address_label'] as String?;
|
||||
name = json['name'] as String?;
|
||||
symbol = json['symbol'] as String?;
|
||||
decimals = json['decimals'] as String?;
|
||||
logo = json['logo'] as String?;
|
||||
logoHash = json['logo_hash'] as String?;
|
||||
thumbnail = json['thumbnail'] as String?;
|
||||
totalSupply = json['total_supply'] as String?;
|
||||
totalSupplyFormatted = json['total_supply_formatted'] as String?;
|
||||
fullyDilutedValuation = json['fully_diluted_valuation'] as String?;
|
||||
blockNumber = json['block_number'] as String?;
|
||||
validated = json['validated'] as int?;
|
||||
createdAt = json['created_at'] as String?;
|
||||
possibleSpam = json['possible_spam'] as bool?;
|
||||
verifiedContract = json['verified_contract'] as bool;
|
||||
links =
|
||||
json['links'] != null ? new Links.fromJson(json['links'] as Map<String, dynamic>) : null;
|
||||
securityScore = json['security_score'] as int?;
|
||||
}
|
||||
}
|
||||
|
||||
class Links {
|
||||
String? twitter;
|
||||
String? website;
|
||||
String? facebook;
|
||||
String? reddit;
|
||||
String? github;
|
||||
String? linkedin;
|
||||
String? telegram;
|
||||
|
||||
Links({this.twitter, this.website, this.facebook, this.reddit});
|
||||
|
||||
Links.fromJson(Map<String, dynamic> json) {
|
||||
twitter = json['twitter'] as String?;
|
||||
website = json['website'] as String?;
|
||||
facebook = json['facebook'] as String?;
|
||||
reddit = json['reddit'] as String?;
|
||||
github = json['github'] as String?;
|
||||
linkedin = json['linkedin'] as String?;
|
||||
telegram = json['telegram'] as String?;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user