Erc20 token transactions are displaying incorrectly (#1493)

* evm signature name

* hide depositWithExpiry and transfer transactions

* Update contact_list_view_model.dart

* remove erc20 token history when disabled
This commit is contained in:
Serhii 2024-06-20 23:13:12 +00:00 committed by GitHub
parent 40c2712f55
commit 1690f6af1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 79 additions and 7 deletions

View file

@ -29,6 +29,11 @@ class EthereumClient extends EVMChainClient {
final jsonResponse = json.decode(response.body) as Map<String, dynamic>;
if (jsonResponse['result'] is String) {
log(jsonResponse['result']);
return [];
}
if (response.statusCode >= 200 && response.statusCode < 300 && jsonResponse['status'] != 0) {
return (jsonResponse['result'] as List)
.map((e) => EVMChainTransactionModel.fromJson(e as Map<String, dynamic>, 'ETH'))

View file

@ -14,6 +14,7 @@ class EthereumTransactionInfo extends EVMChainTransactionInfo {
required super.confirmations,
required super.to,
required super.from,
super.evmSignatureName,
super.exponent,
});
@ -31,6 +32,7 @@ class EthereumTransactionInfo extends EVMChainTransactionInfo {
tokenSymbol: data['tokenSymbol'] as String,
to: data['to'],
from: data['from'],
evmSignatureName: data['evmSignatureName'],
);
}

View file

@ -94,6 +94,7 @@ class EthereumWallet extends EVMChainWallet {
tokenSymbol: transactionModel.tokenSymbol ?? "ETH",
to: transactionModel.to,
from: transactionModel.from,
evmSignatureName: transactionModel.evmSignatureName,
);
return model;
}