From 9f7a90d48687bbe59e6a21aa2a7d4afdf200dd24 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 10 Mar 2022 10:51:12 +0100 Subject: [PATCH] fix(@wallet): Correctly load token at boot The settings needs to be loaded before the token as they depends of it --- src/app/boot/app_controller.nim | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/app/boot/app_controller.nim b/src/app/boot/app_controller.nim index f9e0f41edc..ae676de124 100644 --- a/src/app/boot/app_controller.nim +++ b/src/app/boot/app_controller.nim @@ -301,7 +301,6 @@ proc load(self: AppController) = self.messageService.init() self.communityService.init() self.bookmarkService.init() - self.tokenService.init() self.dappPermissionsService.init() self.providerService.init() self.transactionService.init() @@ -314,17 +313,14 @@ proc load(self: AppController) = self.ensService.init() self.gifService.init() - let pubKey = self.settingsService.getPublicKey() - singletonInstance.localAccountSensitiveSettings.setFileName(pubKey) - singletonInstance.engine.setRootContextProperty("localAccountSensitiveSettings", self.localAccountSensitiveSettingsVariant) singletonInstance.engine.setRootContextProperty("globalUtils", self.globalUtilsVariant) - self.networkService.init() - self.walletAccountService.init() - - # other global instances self.buildAndRegisterLocalAccountSensitiveSettings() self.buildAndRegisterUserProfile() + + self.networkService.init() + self.tokenService.init() + self.walletAccountService.init() # load main module self.mainModule.load(