move asset and collectible rebuild to communities module
This commit is contained in:
parent
28fa8271a6
commit
cde6c53318
|
@ -318,11 +318,9 @@ proc init*(self: Controller) =
|
||||||
self.delegate.onCommunityCheckAllChannelsPermissionsResponse(args.checkAllChannelsPermissionsResponse)
|
self.delegate.onCommunityCheckAllChannelsPermissionsResponse(args.checkAllChannelsPermissionsResponse)
|
||||||
|
|
||||||
self.events.on(SIGNAL_OWNED_COLLECTIBLES_UPDATE_FINISHED) do(e: Args):
|
self.events.on(SIGNAL_OWNED_COLLECTIBLES_UPDATE_FINISHED) do(e: Args):
|
||||||
self.delegate.onOwnedCollectiblesUpdated()
|
|
||||||
self.asyncCheckPermissions()
|
self.asyncCheckPermissions()
|
||||||
|
|
||||||
self.events.on(SIGNAL_WALLET_ACCOUNT_TOKENS_REBUILT) do(e: Args):
|
self.events.on(SIGNAL_WALLET_ACCOUNT_TOKENS_REBUILT) do(e: Args):
|
||||||
self.delegate.onWalletAccountTokensRebuilt()
|
|
||||||
self.asyncCheckPermissions()
|
self.asyncCheckPermissions()
|
||||||
|
|
||||||
self.events.on(SIGNAL_COMMUNITY_KICKED) do (e: Args):
|
self.events.on(SIGNAL_COMMUNITY_KICKED) do (e: Args):
|
||||||
|
|
|
@ -367,9 +367,6 @@ method onCommunityTokenPermissionDeleted*(self: AccessInterface, communityId: st
|
||||||
method onCommunityTokenPermissionDeletionFailed*(self: AccessInterface, communityId: string) {.base.} =
|
method onCommunityTokenPermissionDeletionFailed*(self: AccessInterface, communityId: string) {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
method onWalletAccountTokensRebuilt*(self: AccessInterface) {.base.} =
|
|
||||||
raise newException(ValueError, "No implementation available")
|
|
||||||
|
|
||||||
method onKickedFromCommunity*(self: AccessInterface) {.base.} =
|
method onKickedFromCommunity*(self: AccessInterface) {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
|
@ -391,9 +388,6 @@ method onDeactivateChatLoader*(self: AccessInterface, chatId: string) {.base.} =
|
||||||
method requestToJoinCommunityWithAuthentication*(self: AccessInterface, communityId: string, ensName: string) {.base.} =
|
method requestToJoinCommunityWithAuthentication*(self: AccessInterface, communityId: string, ensName: string) {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
method onOwnedcollectiblesUpdated*(self: AccessInterface) {.base.} =
|
|
||||||
raise newException(ValueError, "No implementation available")
|
|
||||||
|
|
||||||
method onCommunityCheckPermissionsToJoinResponse*(self: AccessInterface, checkPermissionsToJoinResponse: CheckPermissionsToJoinResponseDto) {.base.} =
|
method onCommunityCheckPermissionsToJoinResponse*(self: AccessInterface, checkPermissionsToJoinResponse: CheckPermissionsToJoinResponseDto) {.base.} =
|
||||||
|
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
|
@ -304,12 +304,6 @@ proc reevaluateRequiresTokenPermissionToJoin(self: Module) =
|
||||||
proc initCommunityTokenPermissionsModel(self: Module, channelGroup: ChannelGroupDto) =
|
proc initCommunityTokenPermissionsModel(self: Module, channelGroup: ChannelGroupDto) =
|
||||||
self.rebuildCommunityTokenPermissionsModel()
|
self.rebuildCommunityTokenPermissionsModel()
|
||||||
|
|
||||||
method onWalletAccountTokensRebuilt*(self: Module) =
|
|
||||||
self.rebuildCommunityTokenPermissionsModel()
|
|
||||||
|
|
||||||
method onOwnedcollectiblesUpdated*(self: Module) =
|
|
||||||
self.rebuildCommunityTokenPermissionsModel()
|
|
||||||
|
|
||||||
proc convertPubKeysToJson(self: Module, pubKeys: string): seq[string] =
|
proc convertPubKeysToJson(self: Module, pubKeys: string): seq[string] =
|
||||||
return map(parseJson(pubKeys).getElems(), proc(x:JsonNode):string = x.getStr)
|
return map(parseJson(pubKeys).getElems(), proc(x:JsonNode):string = x.getStr)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Tables, stint
|
import stint
|
||||||
import ./io_interface
|
import ./io_interface
|
||||||
|
|
||||||
import ../../../core/signals/types
|
import ../../../core/signals/types
|
||||||
|
@ -8,8 +8,8 @@ import ../../../../app_service/service/contacts/service as contacts_service
|
||||||
import ../../../../app_service/service/network/service as networks_service
|
import ../../../../app_service/service/network/service as networks_service
|
||||||
import ../../../../app_service/service/community_tokens/service as community_tokens_service
|
import ../../../../app_service/service/community_tokens/service as community_tokens_service
|
||||||
import ../../../../app_service/service/token/service as token_service
|
import ../../../../app_service/service/token/service as token_service
|
||||||
|
import ../../../../app_service/service/wallet_account/service as wallet_account_service
|
||||||
import ../../shared_models/token_permissions_model
|
import ../../../../app_service/service/collectible/service as collectible_service
|
||||||
|
|
||||||
type
|
type
|
||||||
Controller* = ref object of RootObj
|
Controller* = ref object of RootObj
|
||||||
|
@ -120,6 +120,12 @@ proc init*(self: Controller) =
|
||||||
let args = CommunityTokenMetadataArgs(e)
|
let args = CommunityTokenMetadataArgs(e)
|
||||||
self.delegate.onCommunityTokenMetadataAdded(args.communityId, args.tokenMetadata)
|
self.delegate.onCommunityTokenMetadataAdded(args.communityId, args.tokenMetadata)
|
||||||
|
|
||||||
|
self.events.on(SIGNAL_OWNED_COLLECTIBLES_UPDATE_FINISHED) do(e: Args):
|
||||||
|
self.delegate.onOwnedCollectiblesUpdated()
|
||||||
|
|
||||||
|
self.events.on(SIGNAL_WALLET_ACCOUNT_TOKENS_REBUILT) do(e: Args):
|
||||||
|
self.delegate.onWalletAccountTokensRebuilt()
|
||||||
|
|
||||||
proc getCommunityTags*(self: Controller): string =
|
proc getCommunityTags*(self: Controller): string =
|
||||||
result = self.communityService.getCommunityTags()
|
result = self.communityService.getCommunityTags()
|
||||||
|
|
||||||
|
|
|
@ -153,3 +153,9 @@ method communityInfoAlreadyRequested*(self: AccessInterface) {.base.} =
|
||||||
|
|
||||||
method onCommunityTokenMetadataAdded*(self: AccessInterface, communityId: string, tokenMetadata: CommunityTokensMetadataDto) {.base.} =
|
method onCommunityTokenMetadataAdded*(self: AccessInterface, communityId: string, tokenMetadata: CommunityTokensMetadataDto) {.base.} =
|
||||||
raise newException(ValueError, "No implementation available")
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
|
method onOwnedCollectiblesUpdated*(self: AccessInterface) {.base.} =
|
||||||
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
||||||
|
method onWalletAccountTokensRebuilt*(self: AccessInterface) {.base.} =
|
||||||
|
raise newException(ValueError, "No implementation available")
|
||||||
|
|
|
@ -424,6 +424,12 @@ proc buildTokenList(self: Module) =
|
||||||
self.view.setTokenListItems(tokenListItems)
|
self.view.setTokenListItems(tokenListItems)
|
||||||
self.view.setCollectiblesListItems(collectiblesListItems)
|
self.view.setCollectiblesListItems(collectiblesListItems)
|
||||||
|
|
||||||
|
method onWalletAccountTokensRebuilt*(self: Module) =
|
||||||
|
self.buildTokenList()
|
||||||
|
|
||||||
|
method onOwnedCollectiblesUpdated*(self: Module) =
|
||||||
|
self.buildTokenList()
|
||||||
|
|
||||||
method onCommunityTokenMetadataAdded*(self: Module, communityId: string, tokenMetadata: CommunityTokensMetadataDto) =
|
method onCommunityTokenMetadataAdded*(self: Module, communityId: string, tokenMetadata: CommunityTokensMetadataDto) =
|
||||||
let tokenListItem = initTokenListItem(
|
let tokenListItem = initTokenListItem(
|
||||||
key = tokenMetadata.symbol,
|
key = tokenMetadata.symbol,
|
||||||
|
|
Loading…
Reference in New Issue