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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c477a3845fda03accff72fe5ad6614ea1bafea09
|
||||
Subproject commit 21101c9444288187348599347f00abc1b5e68fd6
|
Loading…
Reference in New Issue