feat: add api to refetch owned collectibles
This commit is contained in:
parent
17cef5f211
commit
ba1f8ba923
|
@ -320,6 +320,13 @@ func (api *API) FetchBalancesByOwnerAndContractAddress(chainID wcommon.ChainID,
|
|||
return api.s.collectiblesManager.FetchBalancesByOwnerAndContractAddress(chainID, ownerAddress, contractAddresses)
|
||||
}
|
||||
|
||||
func (api *API) RefetchOwnedCollectibles() error {
|
||||
log.Debug("wallet.api.RefetchOwnedCollectibles")
|
||||
|
||||
api.s.collectibles.RefetchOwnedCollectibles()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (api *API) FilterOwnedCollectiblesAsync(requestID int32, chainIDs []wcommon.ChainID, addresses []common.Address, offset int, limit int) error {
|
||||
log.Debug("wallet.api.FilterOwnedCollectiblesAsync", "chainIDs.count", len(chainIDs), "addr.count", len(addresses), "offset", offset, "limit", limit)
|
||||
|
||||
|
|
|
@ -188,6 +188,11 @@ func (s *Service) GetCollectiblesDetailsAsync(requestID int32, uniqueIDs []third
|
|||
})
|
||||
}
|
||||
|
||||
func (s *Service) RefetchOwnedCollectibles() {
|
||||
s.stopPeriodicalOwnershipFetch()
|
||||
_ = s.startPeriodicalOwnershipFetch()
|
||||
}
|
||||
|
||||
// Starts periodical fetching for the all wallet addresses and all chains
|
||||
func (s *Service) startPeriodicalOwnershipFetch() error {
|
||||
if s.group != nil {
|
||||
|
|
Loading…
Reference in New Issue