fix(@desktop/wallet): the app crashes when receives "show/hide watch only" value from paired device

Fixes: #12115
This commit is contained in:
Sale Djenic 2023-09-11 11:20:50 +02:00 committed by saledjenic
parent f8347af7b7
commit 61b217c5eb
2 changed files with 3 additions and 2 deletions

View File

@ -180,7 +180,8 @@ method load*(self: Module) =
self.refreshWalletAccounts()
self.events.on(SIGNAL_INCLUDE_WATCH_ONLY_ACCOUNTS_UPDATED) do(e: Args):
self.view.setIncludeWatchOnlyAccount(self.controller.isIncludeWatchOnlyAccount())
let args = SettingsBoolValueArgs(e)
self.view.setIncludeWatchOnlyAccount(args.value)
self.events.on(SIGNAL_WALLET_ACCOUNT_PREFERRED_SHARING_CHAINS_UPDATED) do(e: Args):
let args = AccountArgs(e)

View File

@ -116,7 +116,7 @@ QtObject:
self.events.emit(SIGNAL_MNEMONIC_REMOVED, Args())
if settingsField.name == INCLUDE_WATCH_ONLY_ACCOUNT:
self.settings.includeWatchOnlyAccount = settingsField.value.getBool
self.events.emit(SIGNAL_INCLUDE_WATCH_ONLY_ACCOUNTS_UPDATED, Args())
self.events.emit(SIGNAL_INCLUDE_WATCH_ONLY_ACCOUNTS_UPDATED, SettingsBoolValueArgs(value: self.settings.includeWatchOnlyAccount))
if settingsField.name == PROFILE_MIGRATION_NEEDED:
self.settings.profileMigrationNeeded = settingsField.value.getBool
self.events.emit(SIGNAL_PROFILE_MIGRATION_NEEDED_UPDATED, SettingsBoolValueArgs(value: self.settings.profileMigrationNeeded))