diff --git a/src/app/boot/app_controller.nim b/src/app/boot/app_controller.nim index 87655aca23..e9871700f3 100644 --- a/src/app/boot/app_controller.nim +++ b/src/app/boot/app_controller.nim @@ -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() diff --git a/src/app/modules/main/browser_section/provider/module.nim b/src/app/modules/main/browser_section/provider/module.nim index 144cf1f24e..61cb67c207 100644 --- a/src/app/modules/main/browser_section/provider/module.nim +++ b/src/app/modules/main/browser_section/provider/module.nim @@ -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() diff --git a/src/app_service/service/settings/service.nim b/src/app_service/service/settings/service.nim index d981d7d2ce..9be919cd34 100644 --- a/src/app_service/service/settings/service.nim +++ b/src/app_service/service/settings/service.nim @@ -64,13 +64,13 @@ method getIdentityImage*(self: Service, address: string): IdentityImage = return identityImage method getDappsAddress*(self: Service): string = - return status_go_settings.getSetting[string](Setting.DappsAddress) + return status_go_settings.getSetting[string](Setting.DappsAddress) 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: