fix: wrong service method signature

This commit is contained in:
Richard Ramos 2021-10-22 16:31:25 -04:00 committed by Iuri Matias
parent c0d87dd063
commit a156a8be1e
3 changed files with 10 additions and 4 deletions

View File

@ -254,6 +254,7 @@ proc load*(self: AppController) =
self.communityService.init()
self.bookmarkService.init()
self.tokenService.init()
self.settingsService.init()
self.dappPermissionsService.init()
self.walletAccountService.init()
self.transactionService.init()

View File

@ -33,8 +33,6 @@ method load*(self: Module) =
self.view.load()
self.view.dappsAddress = self.controller.getDappsAddress()
self.view.networkId = self.controller.getCurrentNetworkDetails().config.networkId
self.moduleLoaded = true
self.delegate.providerDidLoad()
method isLoaded*(self: Module): bool =
return self.moduleLoaded
@ -44,3 +42,10 @@ method setDappsAddress*(self: Module, value: string) =
method onDappAddressChanged*(self: Module, value: string) =
self.view.dappsAddress = value
proc checkIfModuleDidLoad(self: Module) =
self.moduleLoaded = true
self.delegate.providerDidLoad()
method viewDidLoad*(self: Module) =
self.checkIfModuleDidLoad()

View File

@ -70,7 +70,7 @@ method setDappsAddress*(self: Service, address: string): bool =
let r = status_go_settings.saveSetting(Setting.DappsAddress, address)
return r.error == ""
method getCurrentNetworkDetails*(self: ServiceInterface): NetworkDetails =
method getCurrentNetworkDetails*(self: Service): NetworkDetails =
let currNetwork = getSetting[string](Setting.Networks_CurrentNetwork, DEFAULT_NETWORK_NAME)
let networks = getSetting[seq[NetworkDetails]](Setting.Networks_Networks)
for n in networks: