fix(@desktop/wallet): prevent collectibles controller crash if network unknown
This commit is contained in:
parent
7dea2e248c
commit
1884f6e033
|
@ -55,6 +55,7 @@ QtObject:
|
||||||
|
|
||||||
proc getExtraData(self: Controller, chainID: int): ExtraData =
|
proc getExtraData(self: Controller, chainID: int): ExtraData =
|
||||||
let network = self.networkService.getNetworkByChainId(chainID)
|
let network = self.networkService.getNetworkByChainId(chainID)
|
||||||
|
if not network.isNil:
|
||||||
return getExtraData(network)
|
return getExtraData(network)
|
||||||
|
|
||||||
proc processGetCollectiblesDetailsResponse(self: Controller, response: JsonNode) =
|
proc processGetCollectiblesDetailsResponse(self: Controller, response: JsonNode) =
|
||||||
|
|
|
@ -152,6 +152,7 @@ QtObject:
|
||||||
|
|
||||||
proc getExtraData(self: Controller, chainID: int): ExtraData =
|
proc getExtraData(self: Controller, chainID: int): ExtraData =
|
||||||
let network = self.networkService.getNetworkByChainId(chainID)
|
let network = self.networkService.getNetworkByChainId(chainID)
|
||||||
|
if not network.isNil:
|
||||||
return getExtraData(network)
|
return getExtraData(network)
|
||||||
|
|
||||||
proc setTempItems(self: Controller, newItems: seq[CollectiblesEntry], offset: int) =
|
proc setTempItems(self: Controller, newItems: seq[CollectiblesEntry], offset: int) =
|
||||||
|
|
Loading…
Reference in New Issue