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
This commit is contained in:
Sale Djenic 2021-07-07 12:09:45 +02:00 committed by Iuri Matias
parent 3bb5be8685
commit 4d148b5c78
1 changed files with 2 additions and 2 deletions

View File

@ -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