fix(@desktop/wallet): prevent collectibles controller crash if network unknown
This commit is contained in:
parent
7dea2e248c
commit
1884f6e033
|
@ -55,7 +55,8 @@ 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)
|
||||||
return getExtraData(network)
|
if not network.isNil:
|
||||||
|
return getExtraData(network)
|
||||||
|
|
||||||
proc processGetCollectiblesDetailsResponse(self: Controller, response: JsonNode) =
|
proc processGetCollectiblesDetailsResponse(self: Controller, response: JsonNode) =
|
||||||
defer: self.setIsDetailedEntryLoading(false)
|
defer: self.setIsDetailedEntryLoading(false)
|
||||||
|
|
|
@ -152,7 +152,8 @@ 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)
|
||||||
return getExtraData(network)
|
if not network.isNil:
|
||||||
|
return getExtraData(network)
|
||||||
|
|
||||||
proc setTempItems(self: Controller, newItems: seq[CollectiblesEntry], offset: int) =
|
proc setTempItems(self: Controller, newItems: seq[CollectiblesEntry], offset: int) =
|
||||||
if offset == 0:
|
if offset == 0:
|
||||||
|
|
Loading…
Reference in New Issue