trackTx method

Future<bool> trackTx(
  1. String? txHash
)

Implementation

Future<bool> trackTx(String? txHash) async {
  var res = await this.messenger!.send(RPCMethod.GetTransaction, txHash);
  if (res.error != null) {
    return false;
  }

  this.transactionID = res.result!.resultMap!['ID'];
  this.receipt = res.result!.resultMap!['receipt'];
  this.status = this.receipt != null && this.receipt!['success']
      ? TxStatus.Confirmed
      : TxStatus.Rejected;

  return true;
}