feat: prepare token service for multichain

This commit is contained in:
Anthony Laibe 2022-02-08 14:32:21 +01:00 committed by Anthony Laibe
parent 8e6ae3c047
commit b2579230a9
2 changed files with 6 additions and 1 deletions

View File

@ -71,6 +71,11 @@ method getNetwork*(self: Service, chainId: int): NetworkDto =
if chainId == network.chainId: if chainId == network.chainId:
return network return network
method getNetwork*(self: Service, chainId: int): NetworkDto =
for network in self.getNetworks():
if chainId == network.chainId:
return network
method getNetwork*(self: Service, networkType: NetworkType): NetworkDto = method getNetwork*(self: Service, networkType: NetworkType): NetworkDto =
for network in self.getNetworks(): for network in self.getNetworks():
if networkType.toChainId() == network.chainId: if networkType.toChainId() == network.chainId:

View File

@ -106,7 +106,7 @@ type
telemetryServerUrl*: string telemetryServerUrl*: string
fleet*: string fleet*: string
currentUserStatus*: CurrentUserStatus currentUserStatus*: CurrentUserStatus
walletVisibleTokens*: Table[int, seq[string]] # [chainId, seq[tokenIds]] walletVisibleTokens*: Table[int, seq[string]]
nodeConfig*: JsonNode nodeConfig*: JsonNode
wakuBloomFilterMode*: bool wakuBloomFilterMode*: bool
recentStickerHashes*: seq[string] recentStickerHashes*: seq[string]