chore: update to nim 2.0
This commit is contained in:
parent
abdbae12e0
commit
d6d405f8b3
|
@ -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
|
||||
|
|
1
Makefile
1
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)" \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) =
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit f8f6bd34bfa3fe12c64b919059ad856a96efcba0
|
|
@ -1 +1 @@
|
|||
Subproject commit a28bb9781ce74e725796c307ad05083e646872be
|
||||
Subproject commit 4524912fcacfd3965e32a9fe23c9bb12d48177ff
|
|
@ -1 +1 @@
|
|||
Subproject commit c5039c1cc6a8a93fc2f3c03a206372eb4412e63b
|
||||
Subproject commit 42052ba362a9cd4685463edb3781beeb9b8e547e
|
Loading…
Reference in New Issue