fix(@desktop/wallet): prevent collectibles controller crash if network unknown

This commit is contained in:
Dario Gabriel Lipicar 2024-04-02 13:31:20 -03:00 committed by dlipicar
parent 7dea2e248c
commit 1884f6e033
2 changed files with 4 additions and 2 deletions

View File

@ -55,6 +55,7 @@ QtObject:
proc getExtraData(self: Controller, chainID: int): ExtraData =
let network = self.networkService.getNetworkByChainId(chainID)
if not network.isNil:
return getExtraData(network)
proc processGetCollectiblesDetailsResponse(self: Controller, response: JsonNode) =

View File

@ -152,6 +152,7 @@ QtObject:
proc getExtraData(self: Controller, chainID: int): ExtraData =
let network = self.networkService.getNetworkByChainId(chainID)
if not network.isNil:
return getExtraData(network)
proc setTempItems(self: Controller, newItems: seq[CollectiblesEntry], offset: int) =