mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-24 13:32:22 +00:00
fix(@desktop/wallet): properly parse suggested routes error response
This commit is contained in:
parent
6ae7e5fea2
commit
ceeef2f313
@ -61,10 +61,12 @@ proc fromEvent*(T: type WalletSignal, signalType: SignalType, jsonSignal: JsonNo
|
||||
let bestRouteJsonNode = event["Best"]
|
||||
result.bestRouteRaw = $bestRouteJsonNode
|
||||
result.bestRoute = bestRouteJsonNode.toTransactionPathsDtoV2()
|
||||
if event.contains("details"):
|
||||
result.error = event["details"].getStr
|
||||
if event.contains("code"):
|
||||
result.errorCode = event["code"].getStr
|
||||
if event.contains("ErrorResponse"):
|
||||
let errorResponseJsonNode = event["ErrorResponse"]
|
||||
if errorResponseJsonNode.contains("details"):
|
||||
result.error = errorResponseJsonNode["details"].getStr
|
||||
if errorResponseJsonNode.contains("code"):
|
||||
result.errorCode = errorResponseJsonNode["code"].getStr
|
||||
except:
|
||||
error "Error parsing best route"
|
||||
return
|
||||
|
2
vendor/status-go
vendored
2
vendor/status-go
vendored
@ -1 +1 @@
|
||||
Subproject commit c477a3845fda03accff72fe5ad6614ea1bafea09
|
||||
Subproject commit 21101c9444288187348599347f00abc1b5e68fd6
|
Loading…
x
Reference in New Issue
Block a user