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
[VDG] Select correct wallet when clicking notification #11005
[VDG] Select correct wallet when clicking notification #11005
Conversation
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.
@@ -43,6 +43,7 @@ void OnClick() | |||
return; | |||
} | |||
|
|||
MainViewModel.Instance.NavBar.SelectedWallet = MainViewModel.Instance.NavBar.Wallets.FirstOrDefault(x => x.Wallet == wallet); |
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.
Can we do:
// TODO: temp solution, remove model creation
var walletModel = new WalletModel(wallet);
UiContext.Navigate().To(walletModel);
So @ichthus1604 will see that we need to work with WalletModels here.
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.
I think @ichthus1604 can review this to see if it's the correct approach given the current status of the refactor. I've seen this workaround applied before, though :)
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.
I think @SuperJMN's code is okay for a temporary workaround. WalletManagerViewModel needs to die on fire anyway.
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.
tACK
Quite possibly. The NavBar code was really messed up. Refactoring it was quite hard and since we don't have tests covering this up, regressions can happen and will happen 😑. |
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.
utACK.
This PR:
Selects the correct wallet when a notification is clicked.
Without this PR:
The NavBar doesn't update its selection to reflect the correct wallet when a notification of a transaction is clicked.