chore(@desktop/general): accounts service updated, inherits `QtObject` class
This commit is contained in:
parent
662a11a57b
commit
db7769b072
|
@ -1,4 +1,4 @@
|
||||||
import os, json, sequtils, strutils, uuids, times
|
import NimQml, os, json, sequtils, strutils, uuids, times
|
||||||
import json_serialization, chronicles
|
import json_serialization, chronicles
|
||||||
|
|
||||||
import ../../../app/global/global_singleton
|
import ../../../app/global/global_singleton
|
||||||
|
@ -32,9 +32,8 @@ let TEST_PEER_ENR = getEnv("TEST_PEER_ENR").string
|
||||||
|
|
||||||
include utils
|
include utils
|
||||||
|
|
||||||
|
QtObject:
|
||||||
type
|
type Service* = ref object of QObject
|
||||||
Service* = ref object of RootObj
|
|
||||||
fleetConfiguration: FleetConfiguration
|
fleetConfiguration: FleetConfiguration
|
||||||
generatedAccounts: seq[GeneratedAccountDto]
|
generatedAccounts: seq[GeneratedAccountDto]
|
||||||
accounts: seq[AccountDto]
|
accounts: seq[AccountDto]
|
||||||
|
@ -45,10 +44,12 @@ type
|
||||||
defaultWalletEmoji: string
|
defaultWalletEmoji: string
|
||||||
|
|
||||||
proc delete*(self: Service) =
|
proc delete*(self: Service) =
|
||||||
discard
|
self.QObject.delete
|
||||||
|
|
||||||
proc newService*(fleetConfiguration: FleetConfiguration): Service =
|
proc newService*(fleetConfiguration: FleetConfiguration): Service =
|
||||||
result = Service()
|
result = Service()
|
||||||
|
new(result, delete)
|
||||||
|
result.QObject.setup
|
||||||
result.fleetConfiguration = fleetConfiguration
|
result.fleetConfiguration = fleetConfiguration
|
||||||
result.isFirstTimeAccountLogin = false
|
result.isFirstTimeAccountLogin = false
|
||||||
result.keyStoreDir = main_constants.ROOTKEYSTOREDIR
|
result.keyStoreDir = main_constants.ROOTKEYSTOREDIR
|
||||||
|
|
Loading…
Reference in New Issue