diff --git a/src/status/libstatus/wallet.nim b/src/status/libstatus/wallet.nim index d21d2bbb85..20be200bfc 100644 --- a/src/status/libstatus/wallet.nim +++ b/src/status/libstatus/wallet.nim @@ -94,8 +94,8 @@ proc hex2Token*(input: string, decimals: int): string = result = $i if(r > 0): result = fmt"{result}.{d}" -proc trackPendingTransaction*(transactionHash: string, fromAddress: string, toAddress: string, trxType: PendingTransactionType, data: string) = - let payload = %* [{"transactionHash": transactionHash, "from": fromAddress, "to": toAddress, "type": $trxType, "additionalData": data, "data": "", "value": 0, "timestamp": 0, "gasPrice": 0, "gasLimit": 0}] +proc trackPendingTransaction*(hash: string, fromAddress: string, toAddress: string, trxType: PendingTransactionType, data: string) = + let payload = %* [{"hash": hash, "from": fromAddress, "to": toAddress, "type": $trxType, "additionalData": data, "data": "", "value": 0, "timestamp": 0, "gasPrice": 0, "gasLimit": 0}] discard callPrivateRPC("wallet_storePendingTransaction", payload) proc getPendingTransactions*(): string = diff --git a/src/status/wallet.nim b/src/status/wallet.nim index 373231f516..713b1da5e4 100644 --- a/src/status/wallet.nim +++ b/src/status/wallet.nim @@ -87,12 +87,12 @@ proc getTransactionReceipt*(self: WalletModel, transactionHash: string): JsonNod proc confirmTransactionStatus(self: WalletModel, pendingTransactions: JsonNode, blockNumber: int) = for trx in pendingTransactions.getElems(): - let transactionReceipt = self.getTransactionReceipt(trx["transactionHash"].getStr) + let transactionReceipt = self.getTransactionReceipt(trx["hash"].getStr) if transactionReceipt.kind != JNull: - status_wallet.deletePendingTransaction(trx["transactionHash"].getStr) + status_wallet.deletePendingTransaction(trx["hash"].getStr) let ev = TransactionMinedArgs( data: trx["data"].getStr, - transactionHash: trx["transactionHash"].getStr, + transactionHash: trx["hash"].getStr, success: transactionReceipt{"status"}.getStr == "0x1", revertReason: "" )