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"]
|
let bestRouteJsonNode = event["Best"]
|
||||||
result.bestRouteRaw = $bestRouteJsonNode
|
result.bestRouteRaw = $bestRouteJsonNode
|
||||||
result.bestRoute = bestRouteJsonNode.toTransactionPathsDtoV2()
|
result.bestRoute = bestRouteJsonNode.toTransactionPathsDtoV2()
|
||||||
if event.contains("details"):
|
if event.contains("ErrorResponse"):
|
||||||
result.error = event["details"].getStr
|
let errorResponseJsonNode = event["ErrorResponse"]
|
||||||
if event.contains("code"):
|
if errorResponseJsonNode.contains("details"):
|
||||||
result.errorCode = event["code"].getStr
|
result.error = errorResponseJsonNode["details"].getStr
|
||||||
|
if errorResponseJsonNode.contains("code"):
|
||||||
|
result.errorCode = errorResponseJsonNode["code"].getStr
|
||||||
except:
|
except:
|
||||||
error "Error parsing best route"
|
error "Error parsing best route"
|
||||||
return
|
return
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit c477a3845fda03accff72fe5ad6614ea1bafea09
|
Subproject commit 21101c9444288187348599347f00abc1b5e68fd6
|
Loading…
Reference in New Issue