chore(warnings): clean up some Nim warnings

This commit is contained in:
Jonathan Rainville 2023-04-25 15:34:22 -04:00
parent b00ebeb615
commit c44e46a6a5
83 changed files with 153 additions and 242 deletions

View File

@ -30,7 +30,7 @@ QtObject:
var jsonSignal: JsonNode
try:
jsonSignal = statusSignal.parseJson
except:
except CatchableError:
error "Invalid signal received", data = statusSignal
return
@ -39,7 +39,7 @@ QtObject:
var signal:Signal
try:
signal = self.decode(jsonSignal)
except:
except CatchableError:
warn "Error decoding signal", err=getCurrentExceptionMsg()
return
@ -60,7 +60,7 @@ QtObject:
var signalType: SignalType
try:
signalType = parseEnum[SignalType](signalString)
except:
except CatchableError:
raise newException(ValueError, "Unknown signal received: " & signalString)
result = case signalType:

View File

@ -142,7 +142,7 @@ proc getContactNameAndImage*(self: Controller, contactId: string):
return self.contactsService.getContactNameAndImage(contactId)
proc addResultItemDetails*(self: Controller, itemId: string, sectionId = "", channelId = "", messageId = "") =
self.resultItems.add(itemId, ResultItemDetails(sectionId: sectionId, channelId: channelId, messageId: messageId))
self.resultItems[itemId] = ResultItemDetails(sectionId: sectionId, channelId: channelId, messageId: messageId)
proc resultItemClicked*(self: Controller, itemId: string) =
let itemDetails = self.resultItems.getOrDefault(itemId)

View File

@ -9,7 +9,6 @@ import result_model, result_item
import ../../shared_models/message_item
import ../../../global/global_singleton
import ../../../global/app_sections_config as conf
import ../../../core/eventemitter
import ../../../../app_service/service/contacts/service as contact_service
import ../../../../app_service/service/chat/service as chat_service
@ -81,7 +80,6 @@ proc buildLocationMenuForChannelGroup(self: Module, channelGroup: ChannelGroupDt
for chatDto in channelGroup.chats:
var chatName = chatDto.name
var chatImage = chatDto.icon
var chatEmoji = chatDto.emoji
var colorHash: ColorHashDto = @[]
var colorId: int = 0
let isOneToOneChat = chatDto.chatType == ChatType.OneToOne
@ -92,7 +90,7 @@ proc buildLocationMenuForChannelGroup(self: Module, channelGroup: ChannelGroupDt
let subItem = location_menu_sub_item.initSubItem(
chatDto.id,
chatName,
if (chatImage != ""): chatImage else: chatEmoji,
if (chatImage != ""): chatImage else: chatDto.emoji,
"",
chatDto.color,
isOneToOneChat,

View File

@ -1,5 +1,4 @@
import Tables
import result
import results
import io_interface
import ../../../../../app_service/service/bookmarks/service as bookmark_service

View File

@ -15,25 +15,25 @@ method onActivated*(self: AccessInterface) {.base.} =
method isLoaded*(self: AccessInterface): bool {.base.} =
raise newException(ValueError, "No implementation available")
method getBookmarks*(self: AccessInterface): seq[bookmark_service.BookmarkDto] =
method getBookmarks*(self: AccessInterface): seq[bookmark_service.BookmarkDto] {.base.} =
raise newException(ValueError, "No implementation available")
method storeBookmark*(self: AccessInterface, url, name: string) =
method storeBookmark*(self: AccessInterface, url, name: string) {.base.} =
raise newException(ValueError, "No implementation available")
method deleteBookmark*(self: AccessInterface, url: string) =
method deleteBookmark*(self: AccessInterface, url: string) {.base.} =
raise newException(ValueError, "No implementation available")
method updateBookmark*(self: AccessInterface, oldUrl, newUrl, newName: string) =
method updateBookmark*(self: AccessInterface, oldUrl, newUrl, newName: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onBoomarkStored*(self: AccessInterface, url: string, name: string, imageUrl: string) =
method onBoomarkStored*(self: AccessInterface, url: string, name: string, imageUrl: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onBookmarkDeleted*(self: AccessInterface, url: string) =
method onBookmarkDeleted*(self: AccessInterface, url: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onBookmarkUpdated*(self: AccessInterface, oldUrl: string, newUrl: string, newName: string, newImageUrl: string) =
method onBookmarkUpdated*(self: AccessInterface, oldUrl: string, newUrl: string, newName: string, newImageUrl: string) {.base.} =
raise newException(ValueError, "No implementation available")
method viewDidLoad*(self: AccessInterface) {.base.} =

View File

@ -1,4 +1,4 @@
import json, strformat
import strformat
type
Item* = object

View File

@ -1,4 +1,4 @@
import sugar, sequtils, Tables
import sugar, sequtils
import io_interface
import ../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../../app_service/service/network/service as network_service
@ -39,7 +39,7 @@ proc getWalletAccount*(self: Controller, accountIndex: int): wallet_account_serv
proc getIndex*(self: Controller, address: string): int =
return self.walletAccountService.getIndex(address)
method findTokenSymbolByAddress*(self: Controller, address: string): string =
proc findTokenSymbolByAddress*(self: Controller, address: string): string =
return self.walletAccountService.findTokenSymbolByAddress(address)
proc getChainIds*(self: Controller): seq[int] =

View File

@ -7,7 +7,6 @@ import ../../../../../app_service/service/network/service as network_service
import ../../../../../app_service/service/token/service as token_service
import ../../../../../app_service/service/currency/service as currency_service
import ../../../shared_models/token_model as token_model
import ../../../shared_models/token_item as token_item
import ../../../shared_models/token_utils
import ../../wallet_section/accounts/utils
@ -60,7 +59,7 @@ proc setAssets(self: Module, tokens: seq[WalletTokenDto]) =
self.view.getAssetsModel().setItems(items)
method switchAccount*(self: Module, accountIndex: int) =
proc switchAccount*(self: Module, accountIndex: int) =
self.currentAccountIndex = accountIndex
let walletAccount = self.controller.getWalletAccount(accountIndex)

View File

@ -1,8 +1,7 @@
import NimQml, sequtils, sugar
import NimQml, sequtils
import ./io_interface
import ../../../shared_models/token_model as token_model
import ../../../shared_models/token_item as token_item
import ../../../shared_models/currency_amount
import ../../wallet_section/accounts/item as account_item

View File

@ -1,5 +1,3 @@
import Tables
import result
import io_interface
import options
import ../../../../../app_service/service/dapp_permissions/service as dapp_permissions_service

View File

@ -16,7 +16,7 @@ method onActivated*(self: AccessInterface) {.base.} =
method loadDapps*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method hasPermission*(self: AccessInterface, hostname: string, address: string, permission: string): bool =
method hasPermission*(self: AccessInterface, hostname: string, address: string, permission: string): bool {.base.} =
raise newException(ValueError, "No implementation available")
method disconnectAddress*(self: AccessInterface, dapp: string, address: string) {.base.} =
@ -28,14 +28,14 @@ method removePermission*(self: AccessInterface, dapp: string, address: string, p
method disconnect*(self: AccessInterface, dapp: string) {.base.} =
raise newException(ValueError, "No implementation available")
method fetchDapps*(self: AccessInterface) =
method fetchDapps*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method fetchPermissions*(self: AccessInterface, dapp: string, address: string) =
method fetchPermissions*(self: AccessInterface, dapp: string, address: string) {.base.} =
raise newException(ValueError, "No implementation available")
method viewDidLoad*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method addPermission*(self: AccessInterface, hostname: string, address: string, permission: string) =
method addPermission*(self: AccessInterface, hostname: string, address: string, permission: string) {.base.} =
raise newException(ValueError, "No implementation available")

View File

@ -1,4 +1,3 @@
import strutils
import io_interface
import ../../../../core/eventemitter

View File

@ -24,7 +24,7 @@ method disconnect*(self: AccessInterface, dappName: string, address: string) {.b
method postMessage*(self: AccessInterface, payloadMethod: string, requestType: string, message: string) {.base.} =
raise newException(ValueError, "No implementation available")
method ensResourceURL*(self: AccessInterface, ens: string, url: string): (string, string, string, string, bool) =
method ensResourceURL*(self: AccessInterface, ens: string, url: string): (string, string, string, string, bool) {.base.} =
raise newException(ValueError, "No implementation available")
method onPostMessage*(self: AccessInterface, payloadMethod: string, result: string, chainId: string) {.base.} =

View File

@ -76,11 +76,11 @@ QtObject:
self.delegate.postMessage(payloadMethod, requestType, message)
proc ensResourceURL*(self: View, ens: string, url: string): string {.slot.} =
let (url, base, http_scheme, path_prefix, hasContentHash) = self.delegate.ensResourceURL(ens, url)
let (url, base, http_scheme, _, hasContentHash) = self.delegate.ensResourceURL(ens, url)
var newHost = url_host(base)
if hasContentHash:
if strutils.endsWith(base, "/"):
newHost = base[.. ^2]
newHost = base[0.. ^2]
else:
newHost = base

View File

@ -1,4 +1,3 @@
import Tables
import NimQml
import json
import io_interface
@ -9,7 +8,6 @@ import ../../../../../app_service/service/contacts/service as contact_service
import ../../../../../app_service/service/chat/service as chat_service
import ../../../../../app_service/service/community/service as community_service
import ../../../../../app_service/service/message/service as message_service
import ../../../../../app_service/service/eth/utils as eth_utils
import ../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../core/signals/types

View File

@ -59,7 +59,7 @@ method viewDidLoad*(self: Module) =
method getModuleAsVariant*(self: Module): QVariant =
return self.viewVariant
method getChatId*(self: Module): string =
proc getChatId*(self: Module): string =
return self.controller.getChatId()
method sendImages*(self: Module, imagePathsAndDataJson: string, msg: string, replyTo: string): string =

View File

@ -116,7 +116,7 @@ method getCurrentFleet*(self: AccessInterface): string {.base.} =
method amIChatAdmin*(self: AccessInterface): bool {.base.} =
raise newException(ValueError, "No implementation available")
method downloadMessages*(self: AccessInterface, filePath: string) =
method downloadMessages*(self: AccessInterface, filePath: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onMutualContactChanged*(self: AccessInterface) {.base.} =

View File

@ -9,7 +9,6 @@ import ../../../../../../app_service/service/chat/service as chat_service
import ../../../../../../app_service/service/message/service as message_service
import ../../../../../../app_service/service/mailservers/service as mailservers_service
import ../../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../../../app_service/service/eth/utils as eth_utils
import ../../../../../global/app_signals
import ../../../../../core/signals/types
import ../../../../../core/eventemitter
@ -322,5 +321,5 @@ proc getWalletAccounts*(self: Controller): seq[wallet_account_service.WalletAcco
proc leaveChat*(self: Controller) =
self.chatService.leaveChat(self.chatId)
method resendChatMessage*(self: Controller, messageId: string): string =
proc resendChatMessage*(self: Controller, messageId: string): string =
return self.messageService.resendChatMessage(messageId)

View File

@ -143,38 +143,38 @@ method leaveChat*(self: AccessInterface) {.base.} =
method didIJoinedChat*(self: AccessInterface): bool {.base.} =
raise newException(ValueError, "No implementation available")
method getMessages*(self: AccessInterface): seq[message_item.Item] =
method getMessages*(self: AccessInterface): seq[message_item.Item] {.base.} =
raise newException(ValueError, "No implementation available")
method onMailserverSynced*(self: AccessInterface, syncedFrom: int64) =
method onMailserverSynced*(self: AccessInterface, syncedFrom: int64) {.base.} =
raise newException(ValueError, "No implementation available")
method resendChatMessage*(self: AccessInterface, messageId: string): string =
method resendChatMessage*(self: AccessInterface, messageId: string): string {.base.} =
raise newException(ValueError, "No implementation available")
method resetNewMessagesMarker*(self: AccessInterface) =
method resetNewMessagesMarker*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method removeNewMessagesMarker*(self: AccessInterface) =
method removeNewMessagesMarker*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method resetAndScrollToNewMessagesMarker*(self: AccessInterface) =
method resetAndScrollToNewMessagesMarker*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method markAllMessagesRead*(self: AccessInterface) =
method markAllMessagesRead*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method markMessagesAsRead*(self: AccessInterface, messages: seq[string]) =
method markMessagesAsRead*(self: AccessInterface, messages: seq[string]) {.base.} =
raise newException(ValueError, "No implementation available")
method updateCommunityDetails*(self: AccessInterface, community: CommunityDto) =
method updateCommunityDetails*(self: AccessInterface, community: CommunityDto) {.base.} =
raise newException(ValueError, "No implementation available")
method onFirstUnseenMessageLoaded*(self: AccessInterface, messageId: string) =
method onFirstUnseenMessageLoaded*(self: AccessInterface, messageId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method isFirstUnseenMessageInitialized*(self: AccessInterface): bool =
method isFirstUnseenMessageInitialized*(self: AccessInterface): bool {.base.} =
raise newException(ValueError, "No implementation available")
method reevaluateViewLoadingState*(self: AccessInterface) =
method reevaluateViewLoadingState*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")

View File

@ -207,7 +207,7 @@ proc checkIfMessageLoadedAndScrollToItIfItIs(self: Module) =
self.controller.increaseLoadingMessagesPerPageFactor()
self.loadMoreMessages()
method currentUserWalletContainsAddress(self: Module, address: string): bool =
proc currentUserWalletContainsAddress(self: Module, address: string): bool =
if (address.len == 0):
return false
let accounts = self.controller.getWalletAccounts()
@ -644,7 +644,7 @@ method getLinkPreviewData*(self: Module, link: string, uuid: string, whiteListed
method onPreviewDataLoaded*(self: Module, previewData: string, uuid: string) =
self.view.onPreviewDataLoaded(previewData, uuid)
method switchToMessage*(self: Module, messageId: string) =
proc switchToMessage*(self: Module, messageId: string) =
let index = self.view.model().findIndexForMessageId(messageId)
if(index != -1):
self.controller.clearSearchedMessageId()

View File

@ -141,7 +141,7 @@ method getMessagesModule*(self: Module): QVariant =
method getUsersModule*(self: Module): QVariant =
return self.usersModule.getModuleAsVariant()
method currentUserWalletContainsAddress(self: Module, address: string): bool =
proc currentUserWalletContainsAddress(self: Module, address: string): bool =
if (address.len == 0):
return false
let accounts = self.controller.getWalletAccounts()
@ -384,9 +384,6 @@ method onMutualContactChanged*(self: Module) =
let isContact = contactDto.isContact
self.view.onMutualContactChanged(isContact)
method contactTrustStatusChanged*(self: Module, publicKey: string, isUntrustworthy: bool) =
self.view.updateTrustStatus(isUntrustworthy)
method onMadeActive*(self: Module) =
# The new messages marker is reset each time the chat is made active,
# as messages may arrive out of order and relying on the previous

View File

@ -1,4 +1,3 @@
import sequtils, sugar
import io_interface
import ../../../../../../app_service/service/contacts/service as contact_service

View File

@ -58,5 +58,5 @@ method addGroupMembers*(self: AccessInterface, pubKeys: seq[string]) {.base.} =
method removeGroupMembers*(self: AccessInterface, pubKeys: seq[string]) {.base.} =
raise newException(ValueError, "No implementation available")
method updateMembersList*(self: AccessInterface) =
method updateMembersList*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")

View File

@ -1,4 +1,4 @@
import NimQml, strutils, sequtils, sugar, chronicles
import NimQml, sequtils, sugar
import io_interface
import view, controller
import ../../../../shared_models/[member_model, member_item]
@ -22,7 +22,7 @@ type
moduleLoaded: bool
# Forward declaration
method addChatMember(self: Module, member: ChatMember)
proc addChatMember(self: Module, member: ChatMember)
proc newModule*(
events: EventEmitter, sectionId: string, chatId: string,
@ -94,7 +94,7 @@ method userProfileUpdated*(self: Module) =
method loggedInUserImageChanged*(self: Module) =
self.view.model().setIcon(singletonInstance.userProfile.getPubKey(), singletonInstance.userProfile.getIcon())
method addChatMember(self: Module, member: ChatMember) =
proc addChatMember(self: Module, member: ChatMember) =
if member.id == "":
return

View File

@ -1,4 +1,4 @@
import Tables, sugar, algorithm, sequtils, strutils
import Tables, sugar, sequtils, strutils
import io_interface
@ -604,10 +604,10 @@ proc editCommunity*(
proc exportCommunity*(self: Controller): string =
self.communityService.exportCommunity(self.sectionId)
method muteCategory*(self: Controller, categoryId: string) =
proc muteCategory*(self: Controller, categoryId: string) =
self.communityService.muteCategory(self.sectionId, categoryId)
method unmuteCategory*(self: Controller, categoryId: string) =
proc unmuteCategory*(self: Controller, categoryId: string) =
self.communityService.unmuteCategory(self.sectionId, categoryId)
proc setCommunityMuted*(self: Controller, muted: bool) =

View File

@ -8,15 +8,12 @@ import ../../../../app_service/service/community/service as community_service
import ../../../../app_service/service/message/service as message_service
import ../../../../app_service/service/gif/service as gif_service
import ../../../../app_service/service/mailservers/service as mailservers_service
import ../../../../app_service/service/token/service as token_service
import model as chats_model
import item as chat_item
import ../../../core/eventemitter
import ../../../core/unique_event_emitter
import ../../shared_models/token_list_item
type
AccessInterface* {.pure inheritable.} = ref object of RootObj
@ -328,25 +325,25 @@ method deleteCommunityCategory*(self: AccessInterface, categoryId: string) {.bas
method prepareEditCategoryModel*(self: AccessInterface, categoryId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method reorderCommunityCategories*(self: AccessInterface, categoryId: string, position: int) =
method reorderCommunityCategories*(self: AccessInterface, categoryId: string, position: int) {.base.} =
raise newException(ValueError, "No implementation available")
method reorderCommunityChat*(self: AccessInterface, categoryId: string, chatId: string, position: int): string =
method reorderCommunityChat*(self: AccessInterface, categoryId: string, chatId: string, position: int): string {.base.} =
raise newException(ValueError, "No implementation available")
method downloadMessages*(self: AccessInterface, chatId: string, filePath: string) =
method downloadMessages*(self: AccessInterface, chatId: string, filePath: string) {.base.} =
raise newException(ValueError, "No implementation available")
method updateLastMessageTimestamp*(self: AccessInterface, chatId: string, lastMessageTimestamp: int) =
method updateLastMessageTimestamp*(self: AccessInterface, chatId: string, lastMessageTimestamp: int) {.base.} =
raise newException(ValueError, "No implementation available")
method contactsStatusUpdated*(self: AccessInterface, statusUpdates: seq[StatusUpdateDto]) =
method contactsStatusUpdated*(self: AccessInterface, statusUpdates: seq[StatusUpdateDto]) {.base.} =
raise newException(ValueError, "No implementation available")
method switchToChannel*(self: AccessInterface, channelName: string) =
method switchToChannel*(self: AccessInterface, channelName: string) {.base.} =
raise newException(ValueError, "No implementation available")
method joinSpectatedCommunity*(self: AccessInterface) =
method joinSpectatedCommunity*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method createOrEditCommunityTokenPermission*(self: AccessInterface, communityId: string, permissionId: string, permissionType: int, tokenCriteriaJson: string, isPrivate: bool) {.base.} =
@ -355,50 +352,50 @@ method createOrEditCommunityTokenPermission*(self: AccessInterface, communityId:
method deleteCommunityTokenPermission*(self: AccessInterface, communityId: string, permissionId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onCommunityTokenPermissionCreated*(self: AccessInterface, communityId: string, tokenPermission: CommunityTokenPermissionDto) =
method onCommunityTokenPermissionCreated*(self: AccessInterface, communityId: string, tokenPermission: CommunityTokenPermissionDto) {.base.} =
raise newException(ValueError, "No implementation available")
method onCommunityTokenPermissionCreationFailed*(self: AccessInterface, communityId: string) =
method onCommunityTokenPermissionCreationFailed*(self: AccessInterface, communityId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onCommunityTokenPermissionUpdated*(self: AccessInterface, communityId: string, tokenPermission: CommunityTokenPermissionDto) =
method onCommunityTokenPermissionUpdated*(self: AccessInterface, communityId: string, tokenPermission: CommunityTokenPermissionDto) {.base.} =
raise newException(ValueError, "No implementation available")
method onCommunityTokenPermissionUpdateFailed*(self: AccessInterface, communityId: string) =
method onCommunityTokenPermissionUpdateFailed*(self: AccessInterface, communityId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onCommunityTokenPermissionDeleted*(self: AccessInterface, communityId: string, permissionId: string) =
method onCommunityTokenPermissionDeleted*(self: AccessInterface, communityId: string, permissionId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onCommunityTokenPermissionDeletionFailed*(self: AccessInterface, communityId: string) =
method onCommunityTokenPermissionDeletionFailed*(self: AccessInterface, communityId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onCommunityTokenMetadataAdded*(self: AccessInterface, communityId: string, tokenMetadata: CommunityTokensMetadataDto) =
method onCommunityTokenMetadataAdded*(self: AccessInterface, communityId: string, tokenMetadata: CommunityTokensMetadataDto) {.base.} =
raise newException(ValueError, "No implementation available")
method onWalletAccountTokensRebuilt*(self: AccessInterface) =
method onWalletAccountTokensRebuilt*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method onKickedFromCommunity*(self: AccessInterface) =
method onKickedFromCommunity*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method onJoinedCommunity*(self: AccessInterface) =
method onJoinedCommunity*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")
method onAcceptRequestToJoinFailedNoPermission*(self: AccessInterface, communityId: string, memberKey: string, requestId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onUserAuthenticated*(self: AccessInterface, pin: string, password: string, keyUid: string) =
method onUserAuthenticated*(self: AccessInterface, pin: string, password: string, keyUid: string) {.base.} =
raise newException(ValueError, "No implementation available")
method requestToJoinCommunity*(self: AccessInterface, communityId: string, ensName: string) =
method requestToJoinCommunity*(self: AccessInterface, communityId: string, ensName: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onDeactivateChatLoader*(self: AccessInterface, chatId: string) =
method onDeactivateChatLoader*(self: AccessInterface, chatId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method requestToJoinCommunityWithAuthentication*(self: AccessInterface, communityId: string, ensName: string) =
method requestToJoinCommunityWithAuthentication*(self: AccessInterface, communityId: string, ensName: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onOwnedcollectiblesUpdated*(self: AccessInterface) =
method onOwnedcollectiblesUpdated*(self: AccessInterface) {.base.} =
raise newException(ValueError, "No implementation available")

View File

@ -3,10 +3,8 @@ import model as chats_model
import item, active_item
import ../../shared_models/user_model as user_model
import ../../shared_models/token_permissions_model
import ../../shared_models/token_permission_item
import ../../shared_models/token_list_model
import ../../shared_models/token_list_item
import ../../../../app_service/service/token/dto
import io_interface
QtObject:
@ -87,7 +85,7 @@ QtObject:
proc isCommunity(self: View): bool {.slot.} =
return self.delegate.isCommunity()
method getMySectionId*(self: View): string {.slot.} =
proc getMySectionId*(self: View): string {.slot.} =
return self.delegate.getMySectionId()
proc chatsModel*(self: View): chats_model.Model =
@ -156,7 +154,7 @@ QtObject:
read = getActiveItem
notify = activeItemChanged
method activeItemSet*(self: View, item: Item) =
proc activeItemSet*(self: View, item: Item) =
self.activeItem.setActiveItemData(item)
self.activeItemChanged()

View File

@ -1,4 +1,4 @@
import NimQml, json, sequtils, sugar, tables, strutils
import NimQml, sequtils, tables
import ./io_interface
import ../io_interface as delegate_interface
@ -12,10 +12,8 @@ import ./models/discord_channels_model
import ./models/discord_file_list_model
import ./models/discord_import_task_item
import ./models/discord_import_tasks_model
import ./models/discord_import_error_item
import ./models/discord_import_errors_model
import ../../shared_models/section_item
import ../../shared_models/[member_item, member_model, section_model]
import ../../shared_models/[member_item, section_model]
import ../../../global/global_singleton
import ../../../core/eventemitter
import ../../../../app_service/common/types
@ -185,7 +183,7 @@ method getCommunityItem(self: Module, c: CommunityDto): SectionItem =
result = self.createTokenItem(tokenDto))
)
method getCuratedCommunityItem(self: Module, c: CommunityDto): CuratedCommunityItem =
proc getCuratedCommunityItem(self: Module, c: CommunityDto): CuratedCommunityItem =
return initCuratedCommunityItem(
c.id,
c.name,
@ -198,13 +196,13 @@ method getCuratedCommunityItem(self: Module, c: CommunityDto): CuratedCommunityI
len(c.members),
int(c.activeMembersCount))
method getDiscordCategoryItem(self: Module, c: DiscordCategoryDto): DiscordCategoryItem =
proc getDiscordCategoryItem(self: Module, c: DiscordCategoryDto): DiscordCategoryItem =
return initDiscordCategoryItem(
c.id,
c.name,
true)
method getDiscordChannelItem(self: Module, c: DiscordChannelDto): DiscordChannelItem =
proc getDiscordChannelItem(self: Module, c: DiscordChannelDto): DiscordChannelItem =
return initDiscordChannelItem(
c.id,
c.categoryId,
@ -247,34 +245,6 @@ method curatedCommunityAdded*(self: Module, community: CommunityDto) =
method curatedCommunityEdited*(self: Module, community: CommunityDto) =
self.view.curatedCommunitiesModel().addItem(self.getCuratedCommunityItem(community))
method requestAdded*(self: Module) =
# TODO to model or view
discard
method communityLeft*(self: Module, communityId: string) =
# TODO to model or view
discard
method communityChannelReordered*(self: Module) =
# TODO to model or view
discard
method communityChannelDeleted*(self: Module, communityId: string, chatId: string) =
# TODO to model or view
discard
method communityCategoryCreated*(self: Module) =
# TODO to model or view
discard
method communityCategoryEdited*(self: Module) =
# TODO to model or view
discard
method communityCategoryDeleted*(self: Module) =
# TODO to model or view
discard
method createCommunity*(self: Module, name: string,
description, introMessage: string, outroMessage: string,
access: int, color: string, tags: string,
@ -373,7 +343,7 @@ method requestImportDiscordCommunity*(self: Module, name: string, description, i
self.view.setDiscordImportHasCommunityImage(imagePath != "")
self.controller.requestImportDiscordCommunity(name, description, introMessage, outroMessage, access, color, tags, imagePath, aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, filesToImport, fromTimestamp, encrypted)
method getDiscordImportTaskItem(self: Module, t: DiscordImportTaskProgress): DiscordImportTaskItem =
proc getDiscordImportTaskItem(self: Module, t: DiscordImportTaskProgress): DiscordImportTaskItem =
return initDiscordImportTaskItem(
t.`type`,
t.progress,
@ -383,10 +353,19 @@ method getDiscordImportTaskItem(self: Module, t: DiscordImportTaskProgress): Dis
t.errorsCount,
t.warningsCount)
method discordImportProgressUpdated*(self: Module, communityId: string, communityName: string, communityImage: string, tasks: seq[DiscordImportTaskProgress], progress: float, errorsCount: int, warningsCount: int, stopped: bool, totalChunksCount: int, currentChunk: int) =
var taskItems: seq[DiscordImportTaskItem] = @[]
method discordImportProgressUpdated*(
self: Module,
communityId: string,
communityName: string,
communityImage: string,
tasks: seq[DiscordImportTaskProgress],
progress: float,
errorsCount: int,
warningsCount: int,
stopped: bool,
totalChunksCount: int,
currentChunk: int
) =
for task in tasks:
if not self.view.discordImportTasksModel().hasItemByType(task.`type`):
self.view.discordImportTasksModel().addItem(self.getDiscordImportTaskItem(task))

View File

@ -1,19 +1,16 @@
import NimQml, json, strutils, json_serialization, sequtils
import NimQml, json, strutils, sequtils
import ./io_interface
import ../../shared_models/section_model
import ../../shared_models/section_item
import ../../shared_models/section_details
import ./models/curated_community_model
import ./models/curated_community_item
import ./models/discord_file_list_model
import ./models/discord_file_item
import ./models/discord_categories_model
import ./models/discord_category_item
import ./models/discord_channels_model
import ./models/discord_channel_item
import ./models/discord_import_tasks_model
import ./models/discord_import_errors_model
QtObject:
type

View File

@ -23,7 +23,7 @@ import ../../../app_service/service/token/service as token_service
import ../../../app_service/service/network/service as networks_service
import ../../../app_service/service/collectible/service as collectible_service
import ../shared_models/section_item, io_interface
import io_interface
import ../shared_modules/keycard_popup/io_interface as keycard_shared_module
logScope:

View File

@ -224,7 +224,7 @@ method setActiveSection*(self: AccessInterface, item: SectionItem, skipSavingInS
method setActiveSectionById*(self: AccessInterface, id: string) {.base.} =
raise newException(ValueError, "No implementation available")
method onChatLeft*(self: AccessInterface, chatId: string) =
method onChatLeft*(self: AccessInterface, chatId: string) {.base.} =
raise newException(ValueError, "No implementation available")
method setCurrentUserStatus*(self: AccessInterface, status: StatusType) {.base.} =

View File

@ -1,4 +1,3 @@
import json, strutils
import io_interface
import ../../../../app_service/service/settings/service as settings_service

View File

@ -1,10 +1,8 @@
import Tables, chronicles
import chronicles
import io_interface
import ../../../../global/app_signals
import ../../../../core/eventemitter
import ../../../../core/fleets/fleet_configuration
import ../../../../../app_service/service/community/service
import ../../../../../app_service/service/settings/service as settings_service
import ../../../../../app_service/service/stickers/service as stickers_service
import ../../../../../app_service/service/node_configuration/service as node_configuration_service
@ -58,7 +56,7 @@ proc setBloomLevel*(self: Controller, bloomLevel: string) =
self.delegate.onBloomLevelSet()
method toggleWakuV2Store*(self: Controller) =
proc toggleWakuV2Store*(self: Controller) =
let enabled = self.nodeConfigurationService.isWakuV2StoreEnabled()
if (not self.nodeConfigurationService.setWakuV2StoreEnabled(not enabled)):
# in the future we may do a call from here to show a popup about this error
@ -66,7 +64,7 @@ method toggleWakuV2Store*(self: Controller) =
return
self.delegate.onWakuV2StoreToggled()
method isWakuV2StoreEnabled*(self: Controller): bool =
proc isWakuV2StoreEnabled*(self: Controller): bool =
return self.nodeConfigurationService.isWakuV2StoreEnabled()

View File

@ -86,16 +86,16 @@ method markUntrustworthy*(self: AccessInterface, publicKey: string): void {.base
method removeTrustStatus*(self: AccessInterface, publicKey: string): void {.base.} =
raise newException(ValueError, "No implementation available")
method getSentVerificationDetailsAsJson*(self: AccessInterface, publicKey: string): string =
method getSentVerificationDetailsAsJson*(self: AccessInterface, publicKey: string): string {.base.} =
raise newException(ValueError, "No implementation available")
method getVerificationDetailsFromAsJson*(self: AccessInterface, publicKey: string): string =
method getVerificationDetailsFromAsJson*(self: AccessInterface, publicKey: string): string {.base.} =
raise newException(ValueError, "No implementation available")
method sendVerificationRequest*(self: AccessInterface, publicKey: string, challenge: string) =
method sendVerificationRequest*(self: AccessInterface, publicKey: string, challenge: string) {.base.} =
raise newException(ValueError, "No implementation available")
method cancelVerificationRequest*(self: AccessInterface, publicKey: string) =
method cancelVerificationRequest*(self: AccessInterface, publicKey: string) {.base.} =
raise newException(ValueError, "No implementation available")
method verifiedTrusted*(self: AccessInterface, publicKey: string): void {.base.} =

View File

@ -158,7 +158,7 @@ proc removeItemWithPubKeyFromAllModels(self: Module, publicKey: string) =
# self.view.sentButRejectedContactRequestsModel().removeItemById(publicKey)
self.view.blockedContactsModel().removeItemById(publicKey)
method removeIfExistsAndAddToAppropriateModel*(self: Module, publicKey: string) =
proc removeIfExistsAndAddToAppropriateModel(self: Module, publicKey: string) =
self.removeItemWithPubKeyFromAllModels(publicKey)
let item = self.createItemFromPublicKey(publicKey)
self.addItemToAppropriateModel(item)

View File

@ -143,7 +143,7 @@ method authenticateAndSetPubKey*(self: Module, chainId: int, ensUsername: string
else:
self.controller.authenticateUser()
method setPubKey*(self: Module, password: string) =
proc setPubKey*(self: Module, password: string) =
let response = self.controller.setPubKey(
self.tmpSendEnsTransactionDetails.chainId,
self.tmpSendEnsTransactionDetails.ensUsername,
@ -200,7 +200,7 @@ method authenticateAndReleaseEns*(self: Module, chainId: int, ensUsername: strin
else:
self.controller.authenticateUser()
method onEnsUsernameRemoved(self: Module, chainId: int, ensUsername: string) =
proc onEnsUsernameRemoved(self: Module, chainId: int, ensUsername: string) =
if (self.controller.getPreferredEnsUsername() == ensUsername):
self.controller.fixPreferredName(true)
self.view.model().removeItemByEnsUsername(chainId, ensUsername)
@ -212,7 +212,7 @@ method removeEnsUsername*(self: Module, chainId: int, ensUsername: string): bool
self.onEnsUsernameRemoved(chainId, ensUsername)
return true
method releaseEns*(self: Module, password: string) =
proc releaseEns*(self: Module, password: string) =
let response = self.controller.release(
self.tmpSendEnsTransactionDetails.chainId,
self.tmpSendEnsTransactionDetails.ensUsername,
@ -321,7 +321,7 @@ method authenticateAndRegisterEns*(self: Module, chainId: int, ensUsername: stri
##
##################################
method registerEns(self: Module, password: string) =
proc registerEns(self: Module, password: string) =
let response = self.controller.registerEns(
self.tmpSendEnsTransactionDetails.chainId,
self.tmpSendEnsTransactionDetails.ensUsername,

View File

@ -1,7 +1,6 @@
import Tables, chronicles, json
import chronicles
import io_interface
import ../../../../global/app_signals
import ../../../../core/eventemitter
import ../../../../../app_service/service/settings/service as settings_service
import ../../../../../app_service/service/chat/service as chat_service
@ -77,7 +76,6 @@ proc init*(self: Controller) =
self.events.on(SIGNAL_CHAT_UPDATE) do(e: Args):
var args = ChatUpdateArgs(e)
for chat in args.chats:
let belongsToCommunity = chat.communityId.len > 0
self.delegate.addChat(chat)
self.events.on(SIGNAL_CHAT_RENAMED) do(e: Args):

View File

@ -1,8 +1,7 @@
import Tables, chronicles
import chronicles
import io_interface
import ../../../../core/eventemitter
import ../../../../core/fleets/fleet_configuration
import ../../../../../app_service/service/settings/service as settings_service
import ../../../../../app_service/service/mailservers/service as mailservers_service
import ../../../../../app_service/service/node_configuration/service as node_configuration_service
@ -55,8 +54,8 @@ proc saveNewMailserver*(self: Controller, name: string, nodeAddress: string) =
proc enableAutomaticSelection*(self: Controller, value: bool) =
self.mailserversService.enableAutomaticSelection(value)
method getUseMailservers*(self: Controller): bool =
proc getUseMailservers*(self: Controller): bool =
return self.settingsService.getUseMailservers()
method setUseMailservers*(self: Controller, value: bool): bool =
proc setUseMailservers*(self: Controller, value: bool): bool =
return self.settingsService.saveUseMailservers(value)

View File

@ -1,9 +1,6 @@
import sugar, sequtils, tables
import io_interface
import ../../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../../../app_service/service/network/service as network_service
import ../../../../../global/global_singleton
import ../../../../shared_modules/keycard_popup/io_interface as keycard_shared_module
import ../../../../../core/eventemitter

View File

@ -1,14 +1,12 @@
import tables, NimQml, sequtils, sugar, chronicles
import NimQml, sequtils, sugar, chronicles
import ./io_interface, ./view, ./item, ./controller, ./utils
import ../io_interface as delegate_interface
import ../../../../../global/global_singleton
import ../../../../../core/eventemitter
import ../../../../../../app_service/common/account_constants
import ../../../../../../app_service/service/keycard/service as keycard_service
import ../../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../../../app_service/service/network/service as network_service
import ../../../../shared_modules/keycard_popup/io_interface as keycard_shared_module
export io_interface
@ -107,7 +105,7 @@ method viewDidLoad*(self: Module) =
method updateAccount*(self: Module, address: string, accountName: string, color: string, emoji: string) =
self.controller.updateAccount(address, accountName, color, emoji)
method authenticateActivityForKeyUid(self: Module, keyUid: string, reason: AuthenticationReason) =
proc authenticateActivityForKeyUid(self: Module, keyUid: string, reason: AuthenticationReason) =
self.authentiactionReason = reason
let keyPair = self.controller.getMigratedKeyPairByKeyUid(keyUid)
let keyPairMigratedToKeycard = keyPair.len > 0

View File

@ -1,4 +1,4 @@
import sugar, sequtils, Tables
import sugar, sequtils
import io_interface
import ../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../../app_service/service/network/service as network_service

View File

@ -1,5 +1,4 @@
import strformat
import ../../../shared_models/currency_amount
type
Item* = object

View File

@ -1,4 +1,4 @@
import NimQml, sequtils, sugar, json
import NimQml, sequtils, json
import ./io_interface
import ../../../shared_models/currency_amount

View File

@ -2,7 +2,6 @@ import NimQml, Tables, strutils, strformat
import ./account_item
import ../../../shared_models/currency_amount
import ../../../shared_models/token_model
type
ModelRole {.pure.} = enum

View File

@ -1,4 +1,4 @@
import sugar, sequtils, tables, stint, json, json_serialization
import sugar, sequtils, stint, json, json_serialization
import io_interface
import ../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../../app_service/service/network/service as network_service
@ -6,7 +6,6 @@ import ../../../../../app_service/service/transaction/service as transaction_ser
import ../../../../../app_service/service/currency/service as currency_service
import ../../../../../app_service/service/currency/dto as currency_dto
import ../../../../global/global_singleton
import ../../../shared_modules/keycard_popup/io_interface as keycard_shared_module
import ../../../shared_models/currency_amount
import ../../../shared_models/currency_amount_utils

View File

@ -1,5 +1,4 @@
import stint
import ../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../shared_models/currency_amount
type

View File

@ -1,10 +1,9 @@
import tables, NimQml, sequtils, sugar, chronicles, json, stint
import tables, NimQml, sequtils, sugar, json, stint
import ./io_interface, ./view, ./account_item, ./controller, ./utils
import ./io_interface, ./view, ./controller, ./utils
import ../io_interface as delegate_interface
import ../../../../global/global_singleton
import ../../../../core/eventemitter
import ../../../../../app_service/common/account_constants
import ../../../../../app_service/service/wallet_account/service as wallet_account_service
import ../../../../../app_service/service/network/service as network_service
import ../../../../../app_service/service/currency/service as currency_service

View File

@ -3,10 +3,8 @@ import ./account_item
import ../../../../../app_service/service/wallet_account/dto
import ../../../../../app_service/service/currency/dto as currency_dto
import ../../../shared_models/currency_amount
import ../../../shared_models/currency_amount_utils
import ../../../shared_models/token_model as token_model
import ../../../shared_models/token_item as token_item
import ../../../shared_models/token_utils
proc walletAccountToItem*(

View File

@ -1,4 +1,4 @@
import NimQml, sequtils, strutils, sugar, stint
import NimQml, sequtils, strutils, stint
import ../../../../../app_service/service/wallet_account/service as wallet_account_service

View File

@ -1,4 +1,4 @@
import Tables, parseutils, sequtils, sugar, chronicles
import parseutils, sequtils, sugar, chronicles
import ../../../../global/global_singleton
import ../../../../../app_service/service/keycard/constants
from ../../../../../app_service/service/keycard/service import KCSFlowType

View File

@ -3,7 +3,7 @@ import NimQml, json, chronicles
import ../settings/service as settings_service
import ../network/types
import ../../../app/core/eventemitter
import ../../../app/core/tasks/[qt, threadpool]
import ../../../app/core/tasks/[threadpool]
import ../../../app/core/signals/types as signal_types
import ../../../backend/backend
import ../../../backend/about as status_about

View File

@ -1,4 +1,4 @@
import NimQml, json, sequtils, chronicles, strutils, strutils, stint, sugar
import NimQml, json, sequtils, chronicles, strutils, strutils, stint
import ../../../app/core/eventemitter
import ../../../app/core/[main]
@ -196,7 +196,7 @@ QtObject:
if response.result.kind != JNull:
for activityType in activityTypes:
if response.result.contains($activityType):
counters.add(activityType, response.result[$activityType].getInt)
counters[activityType] = response.result[$activityType].getInt
return counters
except Exception as e:
error "Error getting unread activity center notifications count", msg = e.msg
@ -209,7 +209,7 @@ QtObject:
var groupTotal = 0
for activityType in activityCenterNotificationTypesByGroup(group):
groupTotal = groupTotal + counters.getOrDefault(activityType, 0)
groupCounters.add(group, groupTotal)
groupCounters[group] = groupTotal
return groupCounters
proc getUnreadActivityCenterNotificationsCount*(self: Service): int =

View File

@ -1,5 +1,5 @@
import Tables, json, sequtils, strformat, chronicles, strutils
import result
import Tables, json, sequtils, chronicles, strutils
import results
include ../../common/json_utils
import ./dto/bookmark as bookmark_dto
import ../../../app/core/eventemitter

View File

@ -1,4 +1,4 @@
import json, Tables, stint, strformat, strutils, times
import json, Tables, stint, strformat, strutils
# Unique identifier for collectible on a specific chain
type

View File

@ -4,7 +4,6 @@ import json, sequtils, sugar, tables, strutils, json_serialization
import ../../../../backend/communities
include ../../../common/json_utils
import ../../../common/types
import ../../../common/conversion
import ../../chat/dto/chat

View File

@ -183,7 +183,6 @@ QtObject:
historyArchiveDownloadTaskCommunityIds*: HashSet[string]
# Forward declaration
proc loadCommunityTags(self: Service): string
proc asyncLoadCuratedCommunities*(self: Service)
proc asyncAcceptRequestToJoinCommunity*(self: Service, communityId: string, requestId: string)
proc handleCommunityUpdates(self: Service, communities: seq[CommunityDto], updatedChats: seq[ChatDto], removedChats: seq[string])
@ -653,12 +652,6 @@ QtObject:
let errDesription = e.msg
error "error loading all communities: ", errDesription
proc loadCommunityTags(self: Service): string =
let response = status_go.getCommunityTags()
var result = newString(0)
toUgly(result, response.result)
return result
proc getCommunityTags*(self: Service): string =
return self.communityTags

View File

@ -1,4 +1,4 @@
import NimQml, Tables, chronicles, json, stint, strutils, strformat
import NimQml, Tables, chronicles, json, stint, strutils
import ../../../app/core/eventemitter
import ../../../app/core/tasks/[qt, threadpool]
import ../../../app/modules/shared_models/currency_amount

View File

@ -1,4 +1,4 @@
import NimQml, strformat, chronicles, strutils, tables, json
import NimQml, chronicles, strutils, tables, json
import ../../../backend/backend as backend

View File

@ -1,6 +1,6 @@
import Tables, json, sequtils, chronicles
import sets
import result
import results
import options
include ../../common/json_utils
import ../../../backend/backend

View File

@ -1,4 +1,4 @@
import NimQml, Tables, sets, json, sequtils, strutils, strformat, chronicles
import NimQml, Tables, sets, json, sequtils, strutils, chronicles
import web3/conversions
import web3/[conversions, ethtypes], stint
import web3/ethtypes
@ -7,13 +7,9 @@ import ../../../app/core/eventemitter
import ../../../app/core/tasks/[qt, threadpool]
import ../../../app/global/global_singleton
import ../../../backend/eth as status_eth
import ../../../backend/ens as status_ens
import ../../../backend/accounts as status_go_accounts
import ../../../backend/backend as status_go_backend
import ../network/types as network_types
import ../../common/conversion as common_conversion
import utils as ens_utils
import ../settings/service as settings_service

View File

@ -1,8 +1,7 @@
import Tables, json, chronicles, strutils
import algorithm, strformat, sets, options, sequtils
import strformat, sets, options
import chronicles, libp2p/[multihash, multicodec, cid]
import nimcrypto, stint
import web3/conversions
import ../../common/conversion as common_conversion
import ../eth/dto/transaction as eth_transaction_dto
import ../../../backend/eth as status_eth

View File

@ -1,12 +1,11 @@
import
atomics, json, tables, sequtils, httpclient, net
import json, random, strutils, strformat, tables, chronicles, unicode, times
json, tables, sequtils, httpclient, net
import json, strutils, strformat, tables, chronicles, unicode, times
import
json_serialization, chronicles, libp2p/[multihash, multibase, multicodec, cid], stint, nimcrypto
json_serialization, chronicles, libp2p/[multihash, multicodec, cid], stint, nimcrypto
from sugar import `=>`, `->`
import stint
from times import getTime, toUnix, nanosecond
import signing_phrases
import web3/ethhexstrings
import ../../common/conversion as common_conversion

View File

@ -33,7 +33,7 @@ QtObject:
result.threadpool = threadpool
proc init*(self: Service) =
if not existsDir(app_constants.ROOTKEYSTOREDIR):
if not dirExists(app_constants.ROOTKEYSTOREDIR):
createDir(app_constants.ROOTKEYSTOREDIR)
proc startMessenger*(self: Service) =

View File

@ -1,5 +1,5 @@
import NimQml
import json_serialization, chronicles, os, strformat, re
import chronicles, os, strformat, re
import ../../../constants as main_constants
import ../../../app/global/global_singleton

View File

@ -162,7 +162,7 @@ QtObject:
result.pinnedMsgCursor = initTable[string, MessageCursor]()
proc removeMessageWithId(messages: var seq[MessageDto], msgId: string) =
for i in 0..< messages.len:
for i in 0..<messages.len:
if (messages[i].id == msgId):
messages.delete(i)
return

View File

@ -1,5 +1,5 @@
import hashes, strformat, json, json_serialization
import hashes, strformat, json_serialization
import ./types

View File

@ -1,4 +1,4 @@
import NimQml, chronicles, Tables, strutils, sequtils, sugar, strformat, json
import NimQml, chronicles, Tables, strutils, sequtils, sugar, json
import ../../../app/global/global_singleton
import ../../../app/core/eventemitter
@ -8,7 +8,6 @@ import ../wallet_account/service as wallet_service
import ../network/service as network_service
import ../node/service as node_service
import ../collectible/service as collectible_service
import ../../../backend/backend as backend
logScope:
topics = "network-connection-service"
@ -137,7 +136,6 @@ QtObject:
return (allDown, chaindIdsDown)
proc getFormattedStringForChainIds(self: Service, chainIds: seq[int]): string =
var result: string = ""
for chainId in chainIds:
if result.isEmptyOrWhitespace:
result = $chainId

View File

@ -1,4 +1,4 @@
import NimQml, chronicles, strutils, json, nimcrypto
import NimQml, chronicles, strutils, json
import ../settings/service as settings_service
import ../node_configuration/service as node_configuration_service

View File

@ -1,8 +1,7 @@
import chronicles, json, strutils
import chronicles, strutils
import ./dto/node_config
import ../settings/service as settings_service
import ../community/service
import ../../../app/core/eventemitter
import ../../../app/core/fleets/fleet_configuration
import ../../../backend/node_config as status_node_config
@ -286,7 +285,7 @@ proc isV2LightMode*(self: Service): bool =
proc isFullNode*(self: Service): bool =
return self.configuration.WakuConfig.FullNode
method isWakuV2StoreEnabled*(self: Service): bool =
proc isWakuV2StoreEnabled*(self: Service): bool =
return self.configuration.WakuV2Config.EnableStore
proc setWakuV2StoreEnabled*(self: Service, enabled: bool, storeCapacity: int = 0, storeSeconds: int = 0): bool =

View File

@ -6,7 +6,6 @@ import ../accounts/service as accounts_service
import ../../../app/core/eventemitter
import ../../../backend/accounts as status_account
import ../../../backend/eth as status_eth
import ../../../backend/privacy as status_privacy

View File

@ -1,4 +1,3 @@
import ../../common/utils
const WEB3_SEND_ASYNC = "web3-send-async-read-only"

View File

@ -4,7 +4,6 @@ import ../../../backend/provider as status_go_provider
import ../../../app/core/eventemitter
import ../../../app/core/tasks/[qt, threadpool]
import ../ens/service as ens_service
import ../../common/utils
logScope:
topics = "provider-service"

View File

@ -1,6 +1,5 @@
import NimQml, chronicles, json, strutils, sequtils
import ../../common/[network_constants]
import ../../common/types as common_types
import ../../common/social_links
import ../../common/utils as common_utils

View File

@ -1,4 +1,4 @@
import NimQml, Tables, json, sequtils, chronicles, strutils, atomics, sets, strutils, tables, stint, strformat
import NimQml, Tables, json, sequtils, chronicles, strutils, sets, strutils, tables, stint
import httpclient
@ -23,7 +23,6 @@ import ../transaction/service as transaction_service
import ../network/service as network_service
import ../chat/service as chat_service
import ../../common/types
import ../network/types as network_types
import ../eth/utils as status_utils
export StickerDto

View File

@ -1,6 +1,5 @@
import times
include ../../common/json_utils
import ../eth/utils
import ../../../backend/backend as backend
import ./dto

View File

@ -1,6 +1,5 @@
import NimQml, Tables, json, sequtils, chronicles, strformat, strutils
import NimQml, Tables, json, sequtils, chronicles, strutils
from sugar import `=>`
import web3/ethtypes
from web3/conversions import `$`
import ../../../backend/backend as backend

View File

@ -2,7 +2,6 @@ import json, strutils, stint, json_serialization, strformat
import
web3/ethtypes, json_serialization
from web3/conversions import `$`
include ../../common/json_utils
import ../network/dto

View File

@ -1,4 +1,4 @@
import Tables, NimQml, chronicles, sequtils, sugar, stint, strutils, json, strformat, algorithm, math, random
import Tables, NimQml, chronicles, sequtils, sugar, stint, strutils, json, strformat, algorithm
import ../../../backend/collectibles as collectibles
import ../../../backend/transactions as transactions
@ -6,7 +6,6 @@ import ../../../backend/backend
import ../../../backend/eth
import ../ens/utils as ens_utils
from ../../common/account_constants import ZERO_ADDRESS
import ../../common/conversion as common_conversion
import ../../../app/core/[main]

View File

@ -1,4 +1,4 @@
import chronicles, marshal, json
import chronicles, marshal
import ./dto as dto
import ../../../backend/visual_identity as status_visual_identity

View File

@ -1,11 +1,11 @@
import NimQml, Tables, json, sequtils, sugar, chronicles, strformat, stint, httpclient, net, strutils, os, times, algorithm
import web3/[ethtypes, conversions]
import web3/ethtypes
import ../settings/service as settings_service
import ../accounts/service as accounts_service
import ../token/service as token_service
import ../network/service as network_service
import ../../common/[account_constants, utils]
import ../../common/[utils]
import ../../../app/global/global_singleton
import dto, derived_address, key_pair_dto
@ -448,7 +448,7 @@ QtObject:
self.networkService.setNetworksState(chainIds, enabled)
self.events.emit(SIGNAL_WALLET_ACCOUNT_NETWORK_ENABLED_UPDATED, NetwordkEnabledToggled())
method toggleTestNetworksEnabled*(self: Service) =
proc toggleTestNetworksEnabled*(self: Service) =
discard self.settingsService.toggleTestNetworksEnabled()
self.tokenService.loadData()
self.checkRecentHistory()

View File

@ -1,6 +1,5 @@
import json, json_serialization, chronicles, strutils
import ./core, ../app_service/common/utils
import ../app_service/common/account_constants
import ./response_type
import status_go

View File

@ -1,4 +1,4 @@
import json, strmisc
import json
import core, ../app_service/common/utils
import response_type

View File

@ -1,4 +1,4 @@
import json, json_serialization, chronicles
import json, chronicles
import ../app_service/common/utils
import ./core