-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure accounts are always derived for privileged apps #370
Ensure accounts are always derived for privileged apps #370
Conversation
@@ -162,23 +162,18 @@ class SeedRepository @Inject constructor( | |||
check(!seeds.value.containsKey(nextSeedId)) { "Seed repository already contains an entry for seed $nextSeedId" } | |||
newSeedRecordBuilder.seedId = nextSeedId | |||
id = nextSeedId | |||
val changeNotification = ChangeNotification( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of the changes in this file are strictly necessary, but it cuts down on unnecessary change notifications when nothing actually changed, which improves performance of apps that make use of content notifications.
// Ensure that the seed vault contains appropriate known accounts for this authorization purpose | ||
val seed = seedRepository.seeds.value[seedId]!! | ||
PrepopulateKnownAccountsUseCase(seedRepository).populateKnownAccounts(seed, authorize.purpose) | ||
// Pre-populate known accounts for all purposes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the fix for the root cause of known accounts not being derived.
@@ -44,6 +45,14 @@ class MainViewModel( | |||
viewModelScope.launch { | |||
observeSeedVaultContentChanges() | |||
refreshUiState() | |||
|
|||
// Privileged wallets do not manually authorize individual seeds, so check on startup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes privileged wallets not having any accounts marked as user accounts, and thus an incomplete FakeWallet UI
No description provided.