mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-09 20:29:57 +00:00
tx parsing fix
This commit is contained in:
parent
bfbf175f44
commit
11177b50c3
2 changed files with 8 additions and 7 deletions
|
@ -168,8 +168,8 @@ class EthereumWallet extends CoinServiceAPI
|
|||
@override
|
||||
Future<String> get currentReceivingAddress async {
|
||||
final address = await _currentReceivingAddress;
|
||||
return address?.value ??
|
||||
checksumEthereumAddress(_credentials.address.toString());
|
||||
return checksumEthereumAddress(
|
||||
address?.value ?? _credentials.address.toString());
|
||||
}
|
||||
|
||||
Future<Address?> 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,
|
||||
|
|
|
@ -86,8 +86,8 @@ class EthereumTokenService extends ChangeNotifier with EthTokenCache {
|
|||
|
||||
Future<String> get currentReceivingAddress async {
|
||||
final address = await _currentReceivingAddress;
|
||||
return address?.value ??
|
||||
checksumEthereumAddress(_credentials.address.toString());
|
||||
return checksumEthereumAddress(
|
||||
address?.value ?? _credentials.address.toString());
|
||||
}
|
||||
|
||||
Future<Address?> get _currentReceivingAddress => ethWallet.db
|
||||
|
|
Loading…
Reference in a new issue