fix(@desktop/wallet): Syncing: Difference in decimal places in wallet between synced devices

fixes #13574
This commit is contained in:
Khushboo Mehta 2024-02-29 18:06:37 +01:00 committed by Khushboo-dev-cpp
parent 0fab8e3070
commit 8b46810531
1 changed files with 7 additions and 1 deletions

View File

@ -80,7 +80,13 @@ QtObject:
try:
let responseObj = response.parseJson
if (responseObj.kind == JObject):
let formatsPerSymbol = jsonToFormatsTable(responseObj)
var formatsJson: JsonNode
discard responseObj.getProp("formats", formatsJson)
if formatsJson.isNil or formatsJson.kind == JNull:
return
let formatsPerSymbol = jsonToFormatsTable(formatsJson)
for symbol, format in formatsPerSymbol:
self.currencyFormatCache[symbol] = format
self.events.emit(SIGNAL_CURRENCY_FORMATS_UPDATED, CurrencyFormatsUpdatedArgs())