Skip to content

Commit

Permalink
fix: fetching criteria for profile showcase collectibles
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaRogachev committed Mar 28, 2024
1 parent cb636ed commit 41662ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,4 @@ proc fetchProfileShowcaseAccountsByAddress*(self: Controller, address: string) =
self.contactsService.fetchProfileShowcaseAccountsByAddress(address)

proc getChainIds*(self: Controller): seq[int] =
self.networkService.getNetworks().map(n => n.chainId)
self.networkService.getCurrentNetworks().map(n => n.chainId)
8 changes: 7 additions & 1 deletion src/app/modules/main/profile_section/contacts/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import models/showcase_contact_social_links_model

export io_interface

const COLLECTIBLES_CACHE_AGE_SECONDS = 60

logScope:
topics = "profile-section-contacts-module"

Expand Down Expand Up @@ -52,7 +54,11 @@ proc newModule*(delegate: delegate_interface.AccessInterface,
requestId = int32(backend_collectibles.CollectiblesRequestID.ProfileShowcase),
loadType = collectiblesc.LoadType.AutoLoadSingleUpdate,
networkService = networkService,
events = events
events = events,
fetchCriteria = backend_collectibles.FetchCriteria(
fetchType: backend_collectibles.FetchType.FetchIfCacheOld,
maxCacheAgeSeconds: COLLECTIBLES_CACHE_AGE_SECONDS
)
)
result.moduleLoaded = false
result.showcaseForAContactLoading = false
Expand Down
3 changes: 0 additions & 3 deletions src/app/modules/main/profile_section/profile/controller.nim
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ proc getAccountByAddress*(self: Controller, address: string): WalletAccountDto =
proc getWalletAccounts*(self: Controller): seq[wallet_account_service.WalletAccountDto] =
self.walletAccountService.getWalletAccounts(true)

proc getChainIds*(self: Controller): seq[int] =
self.networkService.getCurrentNetworks().map(n => n.chainId)

proc setSocialLinks*(self: Controller, links: SocialLinks) =
self.settingsService.setSocialLinks(links)

Expand Down

0 comments on commit 41662ca

Please sign in to comment.