From 528bb53b7720e52fb89cfb7998820fa71ad9b766 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 28 Apr 2023 13:03:12 +0300 Subject: [PATCH] fix(Wallet) move deletion of pending transactions in nim Bump status-go HEAD that removes deletion of pending multi-transactions in status-go Previous implementation was relying on the fact that all pending transactions are also multi-transactions, which it seems not to be the case (e.g. ens, airdrop collectible) Also tried to extend the deletion of multi-transactions to status go but it was causing crashes for minted/dropped tokens. Updates #10474 --- src/app_service/service/transaction/service.nim | 7 +++++-- vendor/status-go | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app_service/service/transaction/service.nim b/src/app_service/service/transaction/service.nim index eb622a3a48..68cee343ec 100644 --- a/src/app_service/service/transaction/service.nim +++ b/src/app_service/service/transaction/service.nim @@ -173,7 +173,7 @@ QtObject: return @[] return toSeq(self.allTransactions[address].values) - + proc watchTransactionResult*(self: Service, watchTxResult: string) {.slot.} = let watchTxResult = parseJson(watchTxResult) let success = watchTxResult["isSuccessfull"].getBool @@ -183,7 +183,10 @@ QtObject: let address = watchTxResult["address"].getStr let transactionReceipt = transactions.getTransactionReceipt(chainId, hash).result if transactionReceipt != nil and transactionReceipt.kind != JNull: - # Pending transaction will be deleted by backend after transfering multi-transaction info to history + # Delete pending transaction. Deleting it in status-go didn't work for all the cases + # TODO: make delete pending and save transaction atomc in status-go after fixing the crash + discard transactions.deletePendingTransaction(chainId, hash) + echo watchTxResult["data"].getStr let ev = TransactionMinedArgs( data: watchTxResult["data"].getStr, diff --git a/vendor/status-go b/vendor/status-go index edf8869ff2..c5a8b40d9c 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit edf8869ff27b5dd16a61067842a38c1c5fa6273b +Subproject commit c5a8b40d9c8b7a0104ea9894b07eb3ca42b530af