fix: loading service without error

This commit is contained in:
Anthony Laibe 2021-10-20 17:26:41 +02:00 committed by Iuri Matias
parent a7a56cf471
commit 5b1510313a
1 changed files with 12 additions and 11 deletions

View File

@ -20,6 +20,7 @@ type
proc toSettingDto*(jsonObj: JsonNode): SettingDto =
result = SettingDto()
discard jsonObj.getProp("signing-phrase", result.signingPhrase)
if not jsonObj.getProp("currency", result.currency):
result.currency = DEFAULT_CURRENCY
@ -43,8 +44,8 @@ proc toSettingDto*(jsonObj: JsonNode): SettingDto =
break
result.activeTokenSymbols = @[]
if jsonObj.hasKey("wallet/visible-tokens"):
let symbols = parseJson(jsonObj{"wallet/visible-tokens"}.getStr)
for symbol in symbols{$result.currentNetwork.id}.getElems():
result.activeTokenSymbols.add(symbol.getStr)