From 4d148b5c78e5e0a2737c18fb58f6eda89df82ac4 Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Wed, 7 Jul 2021 12:09:45 +0200 Subject: [PATCH] fix(@desktop/wallet): app crash when signing token transaction with invalid password The issue was accessing non existent property after parsing received response. That caused app crash, fixed now. Fixes: #2623 --- src/app/wallet/views/transactions.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/wallet/views/transactions.nim b/src/app/wallet/views/transactions.nim index ddf3fa5f4..6c012d46a 100644 --- a/src/app/wallet/views/transactions.nim +++ b/src/app/wallet/views/transactions.nim @@ -134,8 +134,8 @@ QtObject: discard self.status.wallet.checkRecentHistory(addresses) proc transactionWatchResultReceived(self: TransactionsView, watchResult: string) {.slot.} = - let wTxRes = watchResult.parseJSON()["result"].getStr().parseJson(){"result"} - if wTxRes.kind == JNull: + let wTxRes = watchResult.parseJSON() + if not wTxRes.contains("result"): self.checkRecentHistory() else: discard #TODO: Ask Simon if should we show an error popup indicating the trx wasn't mined in 10m or something