diff --git a/lib/services/coins/ethereum/ethereum_wallet.dart b/lib/services/coins/ethereum/ethereum_wallet.dart index a5af59607..526d141a8 100644 --- a/lib/services/coins/ethereum/ethereum_wallet.dart +++ b/lib/services/coins/ethereum/ethereum_wallet.dart @@ -168,8 +168,8 @@ class EthereumWallet extends CoinServiceAPI @override Future get currentReceivingAddress async { final address = await _currentReceivingAddress; - return address?.value ?? - checksumEthereumAddress(_credentials.address.toString()); + return checksumEthereumAddress( + address?.value ?? _credentials.address.toString()); } Future get _currentReceivingAddress => db @@ -569,7 +569,8 @@ class EthereumWallet extends CoinServiceAPI var allOwnAddresses = await _fetchAllOwnAddresses(); AddressTransaction addressTransactions = await EthereumAPI.fetchAddressTransactions( - allOwnAddresses.elementAt(0).value, "txlist"); + allOwnAddresses.elementAt(0).value, + ); if (addressTransactions.message == "OK") { final allTxs = addressTransactions.result; for (final element in allTxs) { @@ -845,7 +846,7 @@ class EthereumWallet extends CoinServiceAPI String thisAddress = await currentReceivingAddress; AddressTransaction txs = - await EthereumAPI.fetchAddressTransactions(thisAddress, "txlist"); + await EthereumAPI.fetchAddressTransactions(thisAddress); if (txs.message == "OK") { final allTxs = txs.result; @@ -875,7 +876,7 @@ class EthereumWallet extends CoinServiceAPI final txn = Transaction( walletId: walletId, txid: element["hash"] as String, - timestamp: element["timeStamp"] as int, + timestamp: int.parse(element["timeStamp"].toString()), type: isIncoming ? TransactionType.incoming : TransactionType.outgoing, subType: TransactionSubType.none, diff --git a/lib/services/ethereum/ethereum_token_service.dart b/lib/services/ethereum/ethereum_token_service.dart index c6567973e..dcf8acc46 100644 --- a/lib/services/ethereum/ethereum_token_service.dart +++ b/lib/services/ethereum/ethereum_token_service.dart @@ -86,8 +86,8 @@ class EthereumTokenService extends ChangeNotifier with EthTokenCache { Future get currentReceivingAddress async { final address = await _currentReceivingAddress; - return address?.value ?? - checksumEthereumAddress(_credentials.address.toString()); + return checksumEthereumAddress( + address?.value ?? _credentials.address.toString()); } Future get _currentReceivingAddress => ethWallet.db