diff --git a/.gitmodules b/.gitmodules index edee481b4f..c093ea2327 100644 --- a/.gitmodules +++ b/.gitmodules @@ -114,3 +114,8 @@ [submodule "vendor/qzxing"] path = vendor/qzxing url = https://github.com/status-im/qzxing.git +[submodule "vendor/checksums"] + path = vendor/checksums + url = https://github.com/nim-lang/checksums.git + ignore = untracked + branch = master diff --git a/Makefile b/Makefile index 2980e8b341..180241c7a3 100644 --- a/Makefile +++ b/Makefile @@ -554,6 +554,7 @@ $(NIM_STATUS_CLIENT): NIM_PARAMS += $(RESOURCES_LAYOUT) $(NIM_STATUS_CLIENT): $(NIM_SOURCES) | statusq dotherside check-qt-dir $(STATUSGO) $(STATUSKEYCARDGO) $(QRCODEGEN) $(FLEETS) rcc compile-translations deps echo -e $(BUILD_MSG) "$@" $(ENV_SCRIPT) nim c $(NIM_PARAMS) \ + --mm:refc \ --passL:"-L$(STATUSGO_LIBDIR)" \ --passL:"-lstatus" \ --passL:"-L$(STATUSKEYCARDGO_LIBDIR)" \ diff --git a/src/app/core/tasks/marathon/worker.nim b/src/app/core/tasks/marathon/worker.nim index a06a2cacb9..0720978aa2 100644 --- a/src/app/core/tasks/marathon/worker.nim +++ b/src/app/core/tasks/marathon/worker.nim @@ -14,12 +14,12 @@ type WorkerThreadArg* = object # of RootObj chanSendToMain*: AsyncChannel[ThreadSafeString] chanRecvFromMain*: AsyncChannel[ThreadSafeString] - vptr*: ByteAddress + vptr*: uint MarathonWorker* = ref object of RootObj chanSendToWorker*: AsyncChannel[ThreadSafeString] chanRecvFromWorker*: AsyncChannel[ThreadSafeString] thread*: Thread[WorkerThreadArg] - vptr*: ByteAddress + vptr*: uint method name*(self: MarathonWorker): string {.base.} = # override this base method diff --git a/src/app/core/tasks/qt.nim b/src/app/core/tasks/qt.nim index e19a0cfc23..56fe6a3706 100644 --- a/src/app/core/tasks/qt.nim +++ b/src/app/core/tasks/qt.nim @@ -6,7 +6,7 @@ import # status-desktop libs type QObjectTaskArg* = ref object of TaskArg - vptr*: ByteAddress + vptr*: uint slot*: string proc finish*[T](arg: QObjectTaskArg, payload: T) = diff --git a/src/app/modules/main/activity_center/module.nim b/src/app/modules/main/activity_center/module.nim index 7d58e45cf8..ffc23e8644 100644 --- a/src/app/modules/main/activity_center/module.nim +++ b/src/app/modules/main/activity_center/module.nim @@ -296,7 +296,7 @@ method getDetails*(self: Module, sectionId: string, chatId: string): string = var chatName = c.name var chatImage = c.icon if c.chatType == ChatType.OneToOne: - (chatName, chatImage) = self.controller.getOneToOneChatNameAndImage(c.id) + (chatName, chatImage, _) = self.controller.getOneToOneChatNameAndImage(c.id) jsonObject["cName"] = %* chatName jsonObject["cImage"] = %* chatImage diff --git a/src/app/modules/main/app_search/module.nim b/src/app/modules/main/app_search/module.nim index 80f941c058..36f93fd5e5 100644 --- a/src/app/modules/main/app_search/module.nim +++ b/src/app/modules/main/app_search/module.nim @@ -77,7 +77,7 @@ proc getChatSubItems(self: Module, chats: seq[ChatDto]): seq[location_menu_sub_i var colorId: int = 0 let isOneToOneChat = chatDto.chatType == ChatType.OneToOne if(isOneToOneChat): - (chatName, chatImage) = self.controller.getOneToOneChatNameAndImage(chatDto.id) + (chatName, chatImage, _) = self.controller.getOneToOneChatNameAndImage(chatDto.id) colorHash = self.controller.getColorHash(chatDto.id) colorId = self.controller.getColorId(chatDto.id) let subItem = location_menu_sub_item.initSubItem( @@ -180,7 +180,7 @@ proc getResultItemFromChats(self: Module, sectionId: string, chats: seq[ChatDto] var colorId: int = 0 let isOneToOneChat = chatDto.chatType == ChatType.OneToOne if(isOneToOneChat): - (chatName, chatImage) = self.controller.getOneToOneChatNameAndImage(chatDto.id) + (chatName, chatImage, _) = self.controller.getOneToOneChatNameAndImage(chatDto.id) colorHash = self.controller.getColorHash(chatDto.id) colorId = self.controller.getColorId(chatDto.id) @@ -271,7 +271,7 @@ method onSearchMessagesDone*(self: Module, messages: seq[MessageDto]) = var chatName = chatDto.name var chatImage = chatDto.icon if(chatDto.chatType == ChatType.OneToOne): - (chatName, chatImage) = self.controller.getOneToOneChatNameAndImage(chatDto.id) + (chatName, chatImage, _) = self.controller.getOneToOneChatNameAndImage(chatDto.id) let item = result_item.initItem(m.id, renderedMessageText, $m.timestamp, m.`from`, senderName, SEARCH_RESULT_MESSAGES_SECTION_NAME, senderImage, chatDto.color, chatName, "", chatImage, chatDto.color, false, true, colorId, colorHash) diff --git a/src/app_service/common/json_utils.nim b/src/app_service/common/json_utils.nim index 745b8bd92f..cf3311636c 100644 --- a/src/app_service/common/json_utils.nim +++ b/src/app_service/common/json_utils.nim @@ -2,7 +2,7 @@ import json import web3/ethtypes import types -template getProp(obj: JsonNode, prop: string, value: var typedesc[int]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[int]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = obj[prop].getInt @@ -10,7 +10,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[int]): bool = success -template getProp(obj: JsonNode, prop: string, value: var typedesc[int64]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[int64]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = obj[prop].getBiggestInt @@ -18,7 +18,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[int64]): bool success -template getProp(obj: JsonNode, prop: string, value: var typedesc[uint]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[uint]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = uint(obj[prop].getInt) @@ -26,7 +26,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[uint]): bool = success -template getProp(obj: JsonNode, prop: string, value: var typedesc[uint64]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[uint64]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = uint64(obj[prop].getBiggestInt) @@ -34,7 +34,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[uint64]): bool success -template getProp(obj: JsonNode, prop: string, value: var typedesc[string]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[string]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop) and obj[prop].kind == JString): value = obj[prop].getStr @@ -42,7 +42,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[string]): bool success -template getProp(obj: JsonNode, prop: string, value: var typedesc[float]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[float]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop) and obj[prop].kind == JFloat): value = obj[prop].getFloat @@ -50,7 +50,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[float]): bool success -template getProp(obj: JsonNode, prop: string, value: var typedesc[bool]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[bool]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = obj[prop].getBool @@ -58,7 +58,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[bool]): bool = success -template getProp(obj: JsonNode, prop: string, value: var typedesc[JsonNode]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[JsonNode]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = obj[prop] @@ -66,7 +66,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[JsonNode]): bo success -template getProp(obj: JsonNode, prop: string, value: var typedesc[Address]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[Address]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = fromHex(Address, obj[prop].getStr) @@ -74,7 +74,7 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[Address]): boo success -template getProp(obj: JsonNode, prop: string, value: var typedesc[MemberRole]): bool = +template getProp(obj: JsonNode, prop: string, value: var typedesc[MemberRole]): bool {.redefine.} = var success = false if (obj.kind == JObject and obj.contains(prop)): value = MemberRole(obj[prop].getInt) diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index 01d9c59e12..eba6e4e149 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -335,7 +335,7 @@ QtObject: mnemonic: mnemonic, paths: paths, tptr: fetchAddressesFromNotImportedMnemonicTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAddressesFromNotImportedMnemonicFetched", ) self.threadpool.start(arg) @@ -436,7 +436,7 @@ QtObject: let arg = TimerTaskArg( tptr: timerTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onWaitForReencryptionTimeout", timeoutInMilliseconds: timeout ) @@ -468,7 +468,7 @@ QtObject: let hashedCurrentPassword = hashPassword(currentPassword) let arg = ConvertRegularProfileKeypairToKeycardTaskArg( tptr: convertRegularProfileKeypairToKeycardTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onConvertRegularProfileKeypairToKeycard", accountDataJson: accountDataJson, settingsJson: settingsJson, @@ -498,7 +498,7 @@ QtObject: let hashedNewPassword = hashPassword(newPassword) let arg = ConvertKeycardProfileKeypairToRegularTaskArg( tptr: convertKeycardProfileKeypairToRegularTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onConvertKeycardProfileKeypairToRegular", mnemonic: mnemonic, currentPassword: currentPassword, diff --git a/src/app_service/service/activity_center/service.nim b/src/app_service/service/activity_center/service.nim index 68d63a1fc7..91bd14201c 100644 --- a/src/app_service/service/activity_center/service.nim +++ b/src/app_service/service/activity_center/service.nim @@ -150,7 +150,7 @@ QtObject: proc asyncActivityNotificationLoad*(self: Service) = let arg = AsyncActivityNotificationLoadTaskArg( tptr: asyncActivityNotificationLoadTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncActivityNotificationLoaded", cursor: self.cursor, limit: DEFAULT_LIMIT, diff --git a/src/app_service/service/chat/service.nim b/src/app_service/service/chat/service.nim index e904e746ba..f1b3b236d4 100644 --- a/src/app_service/service/chat/service.nim +++ b/src/app_service/service/chat/service.nim @@ -189,7 +189,7 @@ QtObject: proc asyncGetActiveChats*(self: Service) = let arg = AsyncGetActiveChatsTaskArg( tptr: asyncGetActiveChatsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetActiveChatsResponse", ) self.threadpool.start(arg) @@ -436,7 +436,7 @@ QtObject: let arg = AsyncSendImagesTaskArg( tptr: asyncSendImagesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncSendImagesDone", chatId: chatId, imagePathsAndDataJson: imagePathsAndDataJson, @@ -485,7 +485,7 @@ QtObject: let arg = AsyncSendMessageTaskArg( tptr: asyncSendMessageTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncSendMessageDone", chatId: chatId, processedMsg: processedMsg, @@ -731,7 +731,7 @@ QtObject: proc asyncCheckChannelPermissions*(self: Service, communityId: string, chatId: string) = let arg = AsyncCheckChannelPermissionsTaskArg( tptr: asyncCheckChannelPermissionsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncCheckChannelPermissionsDone", communityId: communityId, chatId: chatId @@ -758,7 +758,7 @@ QtObject: proc asyncCheckAllChannelsPermissions*(self: Service, communityId: string, addresses: seq[string]) = let arg = AsyncCheckAllChannelsPermissionsTaskArg( tptr: asyncCheckAllChannelsPermissionsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncCheckAllChannelsPermissionsDone", communityId: communityId, addresses: addresses, diff --git a/src/app_service/service/community/service.nim b/src/app_service/service/community/service.nim index e67bd4d96a..0db56060b5 100644 --- a/src/app_service/service/community/service.nim +++ b/src/app_service/service/community/service.nim @@ -799,7 +799,7 @@ QtObject: try: let arg = AsyncLoadCommunitiesDataTaskArg( tptr: asyncLoadCommunitiesDataTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncCommunitiesDataLoaded", ) self.threadpool.start(arg) @@ -1481,7 +1481,7 @@ QtObject: proc toggleCollapsedCommunityCategoryAsync*(self: Service, communityId: string, categoryId: string, collapsed: bool) = let arg = AsyncCollapseCategory( tptr: asyncCollapseCategoryTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncCollapseCategoryDone", communityId: communityId, categoryId: categoryId, @@ -1636,7 +1636,7 @@ QtObject: proc asyncCheckPermissionsToJoin*(self: Service, communityId: string, addresses: seq[string]) = let arg = AsyncCheckPermissionsToJoinTaskArg( tptr: asyncCheckPermissionsToJoinTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncCheckPermissionsToJoinDone", communityId: communityId, addresses: addresses, @@ -1712,7 +1712,7 @@ QtObject: try: let arg = AsyncRequestToJoinCommunityTaskArg( tptr: asyncRequestToJoinCommunityTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncRequestToJoinCommunityDone", communityId: communityId, ensName: ensName, @@ -1747,7 +1747,7 @@ QtObject: signatures: seq[string]) = let arg = AsyncEditSharedAddressesTaskArg( tptr: asyncEditSharedAddressesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncEditSharedAddressesDone", communityId: communityId, addressesToShare: addressesToShare, @@ -1779,7 +1779,7 @@ QtObject: self.events.emit(SIGNAL_ACCEPT_REQUEST_TO_JOIN_LOADING, CommunityMemberArgs(communityId: communityId, pubKey: userKey)) let arg = AsyncAcceptRequestToJoinCommunityTaskArg( tptr: asyncAcceptRequestToJoinCommunityTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncAcceptRequestToJoinCommunityDone", communityId: communityId, requestId: requestId @@ -1836,7 +1836,7 @@ QtObject: try: let arg = AsyncLoadCuratedCommunitiesTaskArg( tptr: asyncLoadCuratedCommunitiesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncLoadCuratedCommunitiesDone", ) self.threadpool.start(arg) @@ -1868,7 +1868,7 @@ QtObject: proc collectCommunityMetricsMessagesTimestamps*(self: Service, communityId: string, intervals: string) = let arg = AsyncCollectCommunityMetricsTaskArg( tptr: asyncCollectCommunityMetricsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncCommunityMetricsLoaded", communityId: communityId, metricsType: CommunityMetricsType.MessagesTimestamps, @@ -1879,7 +1879,7 @@ QtObject: proc collectCommunityMetricsMessagesCount*(self: Service, communityId: string, intervals: string) = let arg = AsyncCollectCommunityMetricsTaskArg( tptr: asyncCollectCommunityMetricsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncCommunityMetricsLoaded", communityId: communityId, metricsType: CommunityMetricsType.MessagesCount, @@ -1902,7 +1902,7 @@ QtObject: let arg = AsyncRequestCommunityInfoTaskArg( tptr: asyncRequestCommunityInfoTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncCommunityInfoLoaded", communityId: communityId, importing: importing, @@ -2082,7 +2082,7 @@ QtObject: proc asyncRemoveUserFromCommunity*(self: Service, communityId, pubKey: string) = let arg = AsyncCommunityMemberActionTaskArg( tptr: asyncRemoveUserFromCommunityTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncCommunityMemberActionCompleted", communityId: communityId, pubKey: pubKey, @@ -2092,7 +2092,7 @@ QtObject: proc asyncBanUserFromCommunity*(self: Service, communityId, pubKey: string, deleteAllMessages: bool) = let arg = AsyncCommunityMemberActionTaskArg( tptr: asyncBanUserFromCommunityTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncCommunityMemberActionCompleted", communityId: communityId, pubKey: pubKey, @@ -2103,7 +2103,7 @@ QtObject: proc asyncUnbanUserFromCommunity*(self: Service, communityId, pubKey: string) = let arg = AsyncCommunityMemberActionTaskArg( tptr: asyncUnbanUserFromCommunityTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncCommunityMemberActionCompleted", communityId: communityId, pubKey: pubKey, @@ -2293,7 +2293,7 @@ QtObject: proc asyncGetRevealedAccountsForMember*(self: Service, communityId, memberPubkey: string) = let arg = AsyncGetRevealedAccountsArg( tptr: asyncGetRevealedAccountsForMemberTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetRevealedAccountsForMemberCompleted", communityId: communityId, memberPubkey: memberPubkey, @@ -2324,7 +2324,7 @@ QtObject: proc asyncGetRevealedAccountsForAllMembers*(self: Service, communityId: string) = let arg = AsyncGetRevealedAccountsArg( tptr: asyncGetRevealedAccountsForAllMembersTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetRevealedAccountsForAllMembersCompleted", communityId: communityId, ) @@ -2353,7 +2353,7 @@ QtObject: proc asyncReevaluateCommunityMembersPermissions*(self: Service, communityId: string) = let arg = AsyncGetRevealedAccountsArg( tptr: asyncReevaluateCommunityMembersPermissionsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncReevaluateCommunityMembersPermissionsCompleted", communityId: communityId, ) @@ -2372,7 +2372,7 @@ QtObject: proc asyncSetCommunityShard*(self: Service, communityId: string, shardIndex: int) = let arg = AsyncSetCommunityShardArg( tptr: asyncSetCommunityShardTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncSetCommunityShardDone", communityId: communityId, shardIndex: shardIndex, diff --git a/src/app_service/service/community_tokens/service.nim b/src/app_service/service/community_tokens/service.nim index 42162376b5..94d9311f46 100644 --- a/src/app_service/service/community_tokens/service.nim +++ b/src/app_service/service/community_tokens/service.nim @@ -703,7 +703,7 @@ QtObject: proc getCommunityTokensDetailsAsync*(self: Service, communityId: string) = let arg = GetCommunityTokensDetailsArg( tptr: getCommunityTokensDetailsTaskArg, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onCommunityTokensDetailsLoaded", communityId: communityId ) @@ -731,7 +731,7 @@ QtObject: proc getAllCommunityTokensAsync*(self: Service) = let arg = GetAllCommunityTokensArg( tptr: getAllCommunityTokensTaskArg, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onGotAllCommunityTokens", ) self.threadpool.start(arg) @@ -854,7 +854,7 @@ QtObject: self.tempTokensAndAmounts = collectiblesAndAmounts let arg = AsyncGetMintFees( tptr: asyncGetMintFeesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAirdropFees", collectiblesAndAmounts: collectiblesAndAmounts, walletAddresses: walletAddresses, @@ -887,7 +887,7 @@ QtObject: return let arg = AsyncGetDeployFeesArg( tptr: asyncGetDeployFeesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onDeployFees", chainId: chainId, addressFrom: accountAddress, @@ -903,7 +903,7 @@ QtObject: try: let arg = AsyncSetSignerFeesArg( tptr: asyncSetSignerFeesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onSetSignerFees", chainId: chainId, contractAddress: contractAddress, @@ -921,7 +921,7 @@ QtObject: try: let arg = AsyncDeployOwnerContractsFeesArg( tptr: asyncGetDeployOwnerContractsFeesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onDeployOwnerContractsFees", chainId: chainId, addressFrom: accountAddress, @@ -994,7 +994,7 @@ QtObject: return let arg = AsyncGetRemoteBurnFees( tptr: asyncGetRemoteBurnFeesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onSelfDestructFees", chainId: contract.chainId, contractAddress: contract.address, @@ -1072,7 +1072,7 @@ QtObject: let contract = self.findContractByUniqueId(contractUniqueKey) let arg = AsyncGetBurnFees( tptr: asyncGetBurnFeesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onBurnFees", chainId: contract.chainId, contractAddress: contract.address, @@ -1268,7 +1268,7 @@ QtObject: if communityToken.tokenType == TokenType.ERC20: let arg = FetchAssetOwnersArg( tptr: fetchAssetOwnersTaskArg, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onCommunityTokenOwnersFetched", chainId: communityToken.chainId, contractAddress: communityToken.address, @@ -1279,7 +1279,7 @@ QtObject: elif communityToken.tokenType == TokenType.ERC721: let arg = FetchCollectibleOwnersArg( tptr: fetchCollectibleOwnersTaskArg, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onCommunityTokenOwnersFetched", chainId: communityToken.chainId, contractAddress: communityToken.address, @@ -1353,7 +1353,7 @@ QtObject: proc asyncGetOwnerTokenOwnerAddress*(self: Service, chainId: int, contractAddress: string) = let arg = GetOwnerTokenOwnerAddressArgs( tptr: getOwnerTokenOwnerAddressTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onGetOwnerTokenOwner", chainId: chainId, contractAddress: contractAddress diff --git a/src/app_service/service/contacts/service.nim b/src/app_service/service/contacts/service.nim index 127cb60047..84cdde5497 100644 --- a/src/app_service/service/contacts/service.nim +++ b/src/app_service/service/contacts/service.nim @@ -622,7 +622,7 @@ QtObject: return let arg = LookupContactTaskArg( tptr: lookupContactTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "ensResolved", value: value, chainId: self.networkService.getAppNetwork().chainId, @@ -887,7 +887,7 @@ QtObject: try: let arg = AsyncRequestContactInfoTaskArg( tptr: asyncRequestContactInfoTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncContactInfoLoaded", pubkey: pubkey, ) @@ -921,7 +921,7 @@ QtObject: pubkey: contactId, validate: validate, tptr: asyncGetProfileShowcaseForContactTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncProfileShowcaseForContactLoaded", ) self.threadpool.start(arg) @@ -948,7 +948,7 @@ QtObject: let arg = FetchProfileShowcaseAccountsTaskArg( address: address, tptr: fetchProfileShowcaseAccountsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onProfileShowcaseAccountsByAddressFetched", ) self.threadpool.start(arg) diff --git a/src/app_service/service/currency/service.nim b/src/app_service/service/currency/service.nim index 4b768c46a3..99f1acba8d 100644 --- a/src/app_service/service/currency/service.nim +++ b/src/app_service/service/currency/service.nim @@ -97,7 +97,7 @@ QtObject: proc fetchAllCurrencyFormats(self: Service) = let arg = FetchAllCurrencyFormatsTaskArg( tptr: fetchAllCurrencyFormatsTaskArg, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAllCurrencyFormatsFetched", ) self.threadpool.start(arg) diff --git a/src/app_service/service/devices/service.nim b/src/app_service/service/devices/service.nim index b8a7769023..5e23e340f4 100644 --- a/src/app_service/service/devices/service.nim +++ b/src/app_service/service/devices/service.nim @@ -115,7 +115,7 @@ QtObject: proc asyncLoadDevices*(self: Service) = let arg = AsyncLoadDevicesTaskArg( tptr: asyncLoadDevicesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncDevicesLoaded", ) self.threadpool.start(arg) @@ -244,7 +244,7 @@ QtObject: let arg = AsyncInputConnectionStringArg( tptr: asyncInputConnectionStringTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "inputConnectionStringForBootstrappingFinished", connectionString: connectionString, configJSON: $configJSON @@ -366,7 +366,7 @@ QtObject: let arg = AsyncInputConnectionStringArg( tptr: asyncInputConnectionStringForImportingKeystoreTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "inputConnectionStringForImportingKeystoreFinished", connectionString: connectionString, configJSON: $configJSON diff --git a/src/app_service/service/ens/service.nim b/src/app_service/service/ens/service.nim index 6312505ae4..9024f5ab47 100644 --- a/src/app_service/service/ens/service.nim +++ b/src/app_service/service/ens/service.nim @@ -281,7 +281,7 @@ QtObject: else: let arg = CheckEnsAvailabilityTaskArg( tptr: checkEnsAvailabilityTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onEnsUsernameAvailabilityChecked", ensUsername: ensUsername, chainId: self.getChainId(), @@ -322,7 +322,7 @@ QtObject: let arg = EnsUsernamDetailsTaskArg( tptr: ensUsernameDetailsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onEnsUsernameDetailsFetched", ensUsername: username, chainId: chainId, diff --git a/src/app_service/service/general/service.nim b/src/app_service/service/general/service.nim index d3689fe823..03a04b6ed4 100644 --- a/src/app_service/service/general/service.nim +++ b/src/app_service/service/general/service.nim @@ -69,7 +69,7 @@ QtObject: proc runTimer(self: Service) = let arg = TimerTaskArg( tptr: timerTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onTimeout", timeoutInMilliseconds: TimerIntervalInMilliseconds ) diff --git a/src/app_service/service/gif/service.nim b/src/app_service/service/gif/service.nim index 3a27ec9fb8..b97df87578 100644 --- a/src/app_service/service/gif/service.nim +++ b/src/app_service/service/gif/service.nim @@ -69,7 +69,7 @@ QtObject: try: let arg = AsyncGetRecentGifsTaskArg( tptr: asyncGetRecentGifsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetRecentGifsDone" ) self.threadpool.start(arg) @@ -92,7 +92,7 @@ QtObject: try: let arg = AsyncGetFavoriteGifsTaskArg( tptr: asyncGetFavoriteGifsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetFavoriteGifsDone" ) self.threadpool.start(arg) @@ -118,7 +118,7 @@ QtObject: self.events.emit(SIGNAL_SEARCH_GIFS_STARTED, Args()) let arg = AsyncTenorQueryArg( tptr: asyncTenorQuery, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncTenorQueryDone", apiKeySet: self.apiKeySet, apiKey: TENOR_API_KEY_RESOLVED, @@ -138,7 +138,7 @@ QtObject: self.events.emit(SIGNAL_LOAD_TRENDING_GIFS_STARTED, Args()) let arg = AsyncTenorQueryArg( tptr: asyncTenorQuery, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncTenorQueryDone", apiKeySet: self.apiKeySet, apiKey: TENOR_API_KEY_RESOLVED, diff --git a/src/app_service/service/keycard/service.nim b/src/app_service/service/keycard/service.nim index 86e19f097c..80202dfa53 100644 --- a/src/app_service/service/keycard/service.nim +++ b/src/app_service/service/keycard/service.nim @@ -260,7 +260,7 @@ QtObject: let arg = TimerTaskArg( tptr: timerTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onTimeout", timeoutInMilliseconds: timeoutInMilliseconds, reason: reason diff --git a/src/app_service/service/mailservers/service.nim b/src/app_service/service/mailservers/service.nim index b44e91d53d..e13527dd6e 100644 --- a/src/app_service/service/mailservers/service.nim +++ b/src/app_service/service/mailservers/service.nim @@ -129,7 +129,7 @@ QtObject: proc requestMoreMessages*(self: Service, chatId: string) = let arg = RequestMoreMessagesTaskArg( tptr: requestMoreMessagesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), chatId: chatId, ) self.threadpool.start(arg) @@ -137,7 +137,7 @@ QtObject: proc fillGaps*(self: Service, chatId: string, messageId: string) = let arg = FillGapsTaskArg( tptr: fillGapsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), chatId: chatId, messageIds: @[messageId] ) @@ -237,7 +237,7 @@ QtObject: #let mailserverWorker = self.marathon[MailserverWorker().name] #let task = GetActiveMailserverTaskArg( # `proc`: "getActiveMailserver", - # vptr: cast[ByteAddress](self.vptr), + # vptr: cast[uint](self.vptr), # slot: "onActiveMailserverResult" # ) #mailserverWorker.start(task) diff --git a/src/app_service/service/message/service.nim b/src/app_service/service/message/service.nim index 1cda572bab..543d0ce286 100644 --- a/src/app_service/service/message/service.nim +++ b/src/app_service/service/message/service.nim @@ -236,7 +236,7 @@ QtObject: let arg = AsyncFetchChatMessagesTaskArg( tptr: asyncFetchChatMessagesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncLoadMoreMessagesForChat", chatId: chatId, msgCursor: msgCursorValue, @@ -260,7 +260,7 @@ QtObject: let arg = AsyncFetchChatMessagesTaskArg( tptr: asyncFetchPinnedChatMessagesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncLoadPinnedMessagesForChat", chatId: chatId, msgCursor: pinnedMsgCursorValue, @@ -285,7 +285,7 @@ QtObject: communityId: communityId, memberPubKey: memberPublicKey, tptr: asyncLoadCommunityMemberAllMessagesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncLoadCommunityMemberAllMessages" ) @@ -673,7 +673,7 @@ QtObject: let arg = AsyncMarkMessageAsUnreadTaskArg( tptr: asyncMarkMessageAsUnreadTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncMarkMessageAsUnread", messageId: messageId, chatId: chatId @@ -724,7 +724,7 @@ QtObject: let requestId = genUUID() let arg = AsyncGetMessageByMessageIdTaskArg( tptr: asyncGetMessageByMessageIdTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetMessageById", requestId: $requestId, messageId: messageId, @@ -776,7 +776,7 @@ QtObject: let arg = AsyncSearchMessagesInChatTaskArg( tptr: asyncSearchMessagesInChatTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncSearchMessages", chatId: chatId, searchTerm: searchTerm, @@ -799,7 +799,7 @@ QtObject: let arg = AsyncSearchMessagesInChatsAndCommunitiesTaskArg( tptr: asyncSearchMessagesInChatsAndCommunitiesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncSearchMessages", communityIds: communityIds, chatIds: chatIds, @@ -835,7 +835,7 @@ QtObject: let arg = AsyncMarkAllMessagesReadTaskArg( tptr: asyncMarkAllMessagesReadTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onMarkAllMessagesRead", chatId: chatId ) @@ -920,7 +920,7 @@ QtObject: let arg = AsyncMarkCertainMessagesReadTaskArg( tptr: asyncMarkCertainMessagesReadTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onMarkCertainMessagesRead", chatId: chatId, messagesIds: messagesIds @@ -931,7 +931,7 @@ QtObject: proc getAsyncFirstUnseenMessageId*(self: Service, chatId: string) = let arg = AsyncGetFirstUnseenMessageIdForTaskArg( tptr: asyncGetFirstUnseenMessageIdForTaskArg, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onGetFirstUnseenMessageIdFor", chatId: chatId, ) @@ -994,7 +994,7 @@ QtObject: let uuid = $genUUID() let arg = AsyncGetTextURLsToUnfurlTaskArg( tptr: asyncGetTextURLsToUnfurlTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetTextURLsToUnfurl", text: text, requestUuid: uuid, @@ -1050,7 +1050,7 @@ QtObject: let uuid = $genUUID() let arg = AsyncUnfurlUrlsTaskArg( tptr: asyncUnfurlUrlsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncUnfurlUrlsFinished", urls: urls, requestUuid: uuid, diff --git a/src/app_service/service/metrics/service.nim b/src/app_service/service/metrics/service.nim index 412a1b76ab..e04f0dc463 100644 --- a/src/app_service/service/metrics/service.nim +++ b/src/app_service/service/metrics/service.nim @@ -45,7 +45,7 @@ QtObject: proc addCentralizedMetricIfEnabled*(self: MetricsService, eventName: string, eventValueJson: string) {.slot.} = let arg = AsyncAddCentralizedMetricIfEnabledTaskArg( tptr: asyncAddCentralizedMetricIfEnabledTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onCentralizedMetricAddedIdEnabled", eventName: eventName, eventValueJson: eventValueJson, diff --git a/src/app_service/service/privacy/service.nim b/src/app_service/service/privacy/service.nim index ad03ab14f0..7ab3085f4d 100644 --- a/src/app_service/service/privacy/service.nim +++ b/src/app_service/service/privacy/service.nim @@ -112,7 +112,7 @@ QtObject: let loggedInAccount = self.accountsService.getLoggedInAccount() let arg = ChangeDatabasePasswordTaskArg( tptr: changeDatabasePasswordTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onChangeDatabasePasswordResponse", accountId: loggedInAccount.keyUid, currentPassword: common_utils.hashPassword(password), diff --git a/src/app_service/service/profile/service.nim b/src/app_service/service/profile/service.nim index 38fa5c0925..fa3271eeb5 100644 --- a/src/app_service/service/profile/service.nim +++ b/src/app_service/service/profile/service.nim @@ -116,7 +116,7 @@ QtObject: proc requestProfileShowcasePreferences*(self: Service) = let arg = QObjectTaskArg( tptr: asyncGetProfileShowcasePreferencesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncProfileShowcasePreferencesLoaded", ) self.threadpool.start(arg) @@ -139,7 +139,7 @@ QtObject: let arg = SaveProfileShowcasePreferencesTaskArg( preferences: preferences, tptr: saveProfileShowcasePreferencesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "asyncProfileShowcasePreferencesSaved", ) self.threadpool.start(arg) diff --git a/src/app_service/service/provider/service.nim b/src/app_service/service/provider/service.nim index 89f1737e81..186519246a 100644 --- a/src/app_service/service/provider/service.nim +++ b/src/app_service/service/provider/service.nim @@ -68,7 +68,7 @@ QtObject: proc postMessage*(self: Service, payloadMethod: string, requestType: string, message: string) = let arg = PostMessageTaskArg( tptr: postMessageTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "postMessageResolved", payloadMethod: payloadMethod, requestType: requestType, diff --git a/src/app_service/service/ramp/service.nim b/src/app_service/service/ramp/service.nim index f7b8a241f7..ff95213ff5 100644 --- a/src/app_service/service/ramp/service.nim +++ b/src/app_service/service/ramp/service.nim @@ -52,7 +52,7 @@ QtObject: proc fetchCryptoRampProviders*(self: Service) = let arg = QObjectTaskArg( tptr: getCryptoServicesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onFetchCryptoRampProviders", ) self.threadpool.start(arg) @@ -69,7 +69,7 @@ QtObject: proc fetchCryptoRampUrl*(self: Service, uuid: string, providerID: string, parameters: CryptoRampParametersDto) = let arg = GetCryptoRampUrlTaskArg( tptr: getCryptoRampURLTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onFetchCryptoRampURL", uuid: uuid, providerID: providerID, diff --git a/src/app_service/service/saved_address/service.nim b/src/app_service/service/saved_address/service.nim index 621043a145..4a3e78d43c 100644 --- a/src/app_service/service/saved_address/service.nim +++ b/src/app_service/service/saved_address/service.nim @@ -96,7 +96,7 @@ QtObject: let arg = SavedAddressTaskArg( chainId: self.networkService.getAppNetwork().chainId, tptr: fetchSavedAddressesAndResolveEnsNamesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onSavedAddressesFetched", ) self.threadpool.start(arg) @@ -125,7 +125,7 @@ QtObject: chainShortNames: chainShortNames, isTestAddress: self.areTestNetworksEnabled(), tptr: upsertSavedAddressTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onSavedAddressCreatedOrUpdated", ) self.threadpool.start(arg) @@ -152,7 +152,7 @@ QtObject: address: address, isTestAddress: self.areTestNetworksEnabled(), tptr: deleteSavedAddressTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onDeleteSavedAddress", ) self.threadpool.start(arg) diff --git a/src/app_service/service/stickers/service.nim b/src/app_service/service/stickers/service.nim index 472cb871f7..426d8f60a5 100644 --- a/src/app_service/service/stickers/service.nim +++ b/src/app_service/service/stickers/service.nim @@ -204,7 +204,7 @@ QtObject: let arg = ObtainMarketStickerPacksTaskArg( tptr: obtainMarketStickerPacksTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "setMarketStickerPacks", chainId: chainId, ) @@ -235,7 +235,7 @@ QtObject: try: let arg = AsyncGetRecentStickersTaskArg( tptr: asyncGetRecentStickersTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetRecentStickersDone" ) self.threadpool.start(arg) @@ -259,7 +259,7 @@ QtObject: try: let arg = AsyncGetInstalledStickerPacksTaskArg( tptr: asyncGetInstalledStickerPacksTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncGetInstalledStickerPacksDone" ) self.threadpool.start(arg) @@ -290,7 +290,7 @@ QtObject: proc installStickerPack*(self: Service, packId: string) = let arg = InstallStickerPackTaskArg( tptr: installStickerPackTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onStickerPackInstalled", chainId: self.networkService.getAppNetwork().chainId, packId: packId, @@ -322,7 +322,7 @@ QtObject: preferredUsername: string) = let arg = AsyncSendStickerTaskArg( tptr: asyncSendStickerTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAsyncSendStickerDone", chatId: chatId, replyTo: replyTo, diff --git a/src/app_service/service/token/service.nim b/src/app_service/service/token/service.nim index e74adb1519..46d84d7070 100644 --- a/src/app_service/service/token/service.nim +++ b/src/app_service/service/token/service.nim @@ -107,7 +107,7 @@ QtObject: defer: self.events.emit(SIGNAL_TOKENS_MARKET_VALUES_ABOUT_TO_BE_UPDATED, Args()) let arg = FetchTokensMarketValuesTaskArg( tptr: fetchTokensMarketValuesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "tokensMarketValuesRetrieved", symbols: symbols, currency: self.getCurrency() @@ -150,7 +150,7 @@ QtObject: self.tokensDetailsLoading = true let arg = FetchTokensDetailsTaskArg( tptr: fetchTokensDetailsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "tokensDetailsRetrieved", symbols: symbols ) @@ -190,7 +190,7 @@ QtObject: defer: self.events.emit(SIGNAL_TOKENS_PRICES_ABOUT_TO_BE_UPDATED, Args()) let arg = FetchTokensPricesTaskArg( tptr: fetchTokensPricesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "tokensPricesRetrieved", symbols: symbols, currencies: @[self.getCurrency()] @@ -362,7 +362,7 @@ QtObject: proc getSupportedTokensList*(self: Service) = let arg = QObjectTaskArg( tptr: getSupportedTokenList, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "supportedTokensListRetrieved", ) self.threadpool.start(arg) @@ -502,7 +502,7 @@ QtObject: proc getHistoricalDataForToken*(self: Service, symbol: string, currency: string, range: int) = let arg = GetTokenHistoricalDataTaskArg( tptr: getTokenHistoricalDataTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "tokenHistoricalDataResolved", symbol: symbol, currency: currency, diff --git a/src/app_service/service/transaction/dto.nim b/src/app_service/service/transaction/dto.nim index bb9f8efb0c..a62622e018 100644 --- a/src/app_service/service/transaction/dto.nim +++ b/src/app_service/service/transaction/dto.nim @@ -8,7 +8,7 @@ include ../../common/json_utils import ../network/dto, ../token/dto import ../../common/conversion as service_conversion -import ./backend/transactions +import ../../../backend/transactions type SendType* {.pure.} = enum diff --git a/src/app_service/service/transaction/service.nim b/src/app_service/service/transaction/service.nim index 416d5b862a..abdef12c71 100644 --- a/src/app_service/service/transaction/service.nim +++ b/src/app_service/service/transaction/service.nim @@ -295,7 +295,7 @@ QtObject: toAmount: toAmount, data: data, tptr: watchTransactionTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "watchTransactionResult", ) self.threadpool.start(arg) @@ -315,7 +315,7 @@ QtObject: proc fetchDecodedTxData*(self: Service, txHash: string, data: string) = let arg = FetchDecodedTxDataTaskArg( tptr: fetchDecodedTxDataTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), data: data, txHash: txHash, slot: "onFetchDecodedTxData", diff --git a/src/app_service/service/wallet_account/balance_history.nim b/src/app_service/service/wallet_account/balance_history.nim index ae147a45e1..c7d4dc8fd9 100644 --- a/src/app_service/service/wallet_account/balance_history.nim +++ b/src/app_service/service/wallet_account/balance_history.nim @@ -12,7 +12,7 @@ proc fetchHistoricalBalanceForTokenAsJson*(self: Service, addresses: seq[string] var chainIds: seq[int] = self.networkService.getEnabledChainIds() let arg = GetTokenBalanceHistoryDataTaskArg( tptr: getTokenBalanceHistoryDataTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "tokenBalanceHistoryDataResolved", chainIds: chainIds, addresses: addresses, diff --git a/src/app_service/service/wallet_account/service_account.nim b/src/app_service/service/wallet_account/service_account.nim index b9aedaba85..c76f827bd1 100644 --- a/src/app_service/service/wallet_account/service_account.nim +++ b/src/app_service/service/wallet_account/service_account.nim @@ -478,7 +478,7 @@ proc migrateNonProfileKeycardKeypairToAppAsync*(self: Service, keyUid, seedPhras finalPassword = utils.hashPassword(password) let arg = MigrateNonProfileKeycardKeypairToAppTaskArg( tptr: migrateNonProfileKeycardKeypairToAppTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onNonProfileKeycardKeypairMigratedToApp", keyUid: keyUid, seedPhrase: seedPhrase, @@ -502,7 +502,7 @@ proc onENSNamesFetched*(self: Service, response: string) {.slot.} = proc fetchENSNamesForAddressesAsync(self: Service, addresses: seq[string], chainId: int) = let arg = FetchENSNamesForAddressesTaskArg( tptr: fetchENSNamesForAddressesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onENSNamesFetched", addresses: addresses, chainId: chainId @@ -679,7 +679,7 @@ proc fetchDerivedAddresses*(self: Service, password: string, derivedFrom: string derivedFrom: derivedFrom, paths: paths, tptr: fetchDerivedAddressesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onDerivedAddressesFetched", ) self.threadpool.start(arg) @@ -699,7 +699,7 @@ proc fetchDerivedAddressesForMnemonic*(self: Service, mnemonic: string, paths: s mnemonic: mnemonic, paths: paths, tptr: fetchDerivedAddressesForMnemonicTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onDerivedAddressesForMnemonicFetched", ) self.threadpool.start(arg) @@ -720,7 +720,7 @@ proc fetchDetailsForAddresses*(self: Service, uniqueId: string, addresses: seq[s uniqueId: uniqueId, addresses: addresses, tptr: fetchDetailsForAddressesTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAddressDetailsFetched", ) self.threadpool.start(arg) @@ -785,7 +785,7 @@ proc onFetchChainIdForUrl*(self: Service, jsonString: string) {.slot.} = proc fetchChainIdForUrl*(self: Service, url: string, isMainUrl: bool) = let arg = FetchChainIdForUrlTaskArg( tptr: fetchChainIdForUrlTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onFetchChainIdForUrl", url: url, isMainUrl: isMainUrl diff --git a/src/app_service/service/wallet_account/service_keycard.nim b/src/app_service/service/wallet_account/service_keycard.nim index dc6b70c6b3..b827477cf1 100644 --- a/src/app_service/service/wallet_account/service_keycard.nim +++ b/src/app_service/service/wallet_account/service_keycard.nim @@ -1,7 +1,7 @@ proc addKeycardOrAccountsAsync*(self: Service, keycard: KeycardDto, accountsComingFromKeycard: bool = false) = let arg = SaveOrUpdateKeycardTaskArg( tptr: saveOrUpdateKeycardTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onKeycardAdded", keycard: keycard, accountsComingFromKeycard: accountsComingFromKeycard @@ -60,7 +60,7 @@ proc addKeycardOrAccounts*(self: Service, keycard: KeycardDto, accountsComingFro proc removeMigratedAccountsForKeycard*(self: Service, keyUid: string, keycardUid: string, accountsToRemove: seq[string]) = let arg = DeleteKeycardAccountsTaskArg( tptr: deleteKeycardAccountsTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onMigratedAccountsForKeycardRemoved", keycard: KeycardDto(keyUid: keyUid, keycardUid: keycardUid, accountsAddresses: accountsToRemove) ) diff --git a/src/app_service/service/wallet_account/service_token.nim b/src/app_service/service/wallet_account/service_token.nim index 15b933c927..454e20d325 100644 --- a/src/app_service/service/wallet_account/service_token.nim +++ b/src/app_service/service/wallet_account/service_token.nim @@ -92,7 +92,7 @@ proc buildAllTokens*(self: Service, accounts: seq[string], store: bool) = let arg = BuildTokensTaskArg( tptr: prepareTokensTask, - vptr: cast[ByteAddress](self.vptr), + vptr: cast[uint](self.vptr), slot: "onAllTokensBuilt", accounts: accounts, storeResult: store diff --git a/src/backend/wallet_connect.nim b/src/backend/wallet_connect.nim index 37cffb3b1b..8f1e97ecc2 100644 --- a/src/backend/wallet_connect.nim +++ b/src/backend/wallet_connect.nim @@ -22,7 +22,7 @@ proc isSuccessResponse(rpcResponse: RpcResponse[JsonNode]): bool = proc addSession*(sessionJson: string): bool = try: let rpcRes = addWalletConnectSession(sessionJson) - return isSuccessResponse(rpcRes): + return isSuccessResponse(rpcRes) except Exception as e: error "AddWalletConnectSession failed: ", "msg", e.msg return false @@ -30,7 +30,7 @@ proc addSession*(sessionJson: string): bool = proc disconnectSession*(topic: string): bool = try: let rpcRes = disconnectWalletConnectSession(topic) - return isSuccessResponse(rpcRes): + return isSuccessResponse(rpcRes) except Exception as e: error "wallet_disconnectWalletConnectSession failed: ", "msg", e.msg return false diff --git a/src/nim_status_client.nim b/src/nim_status_client.nim index 22882382ce..216b70e073 100644 --- a/src/nim_status_client.nim +++ b/src/nim_status_client.nim @@ -1,4 +1,4 @@ -import NimQml, chronicles, os, stew/shims/strformat, strutils, times, md5, json, re +import NimQml, chronicles, os, stew/shims/strformat, strutils, times, checksums/md5, json, re import status_go import keycard_go diff --git a/vendor/checksums b/vendor/checksums new file mode 160000 index 0000000000..f8f6bd34bf --- /dev/null +++ b/vendor/checksums @@ -0,0 +1 @@ +Subproject commit f8f6bd34bfa3fe12c64b919059ad856a96efcba0 diff --git a/vendor/nim-chronicles b/vendor/nim-chronicles index a28bb9781c..4524912fca 160000 --- a/vendor/nim-chronicles +++ b/vendor/nim-chronicles @@ -1 +1 @@ -Subproject commit a28bb9781ce74e725796c307ad05083e646872be +Subproject commit 4524912fcacfd3965e32a9fe23c9bb12d48177ff diff --git a/vendor/uuids b/vendor/uuids index c5039c1cc6..42052ba362 160000 --- a/vendor/uuids +++ b/vendor/uuids @@ -1 +1 @@ -Subproject commit c5039c1cc6a8a93fc2f3c03a206372eb4412e63b +Subproject commit 42052ba362a9cd4685463edb3781beeb9b8e547e