Skip to content
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

Update selectedAddress when identities are updated #415

Merged
merged 2 commits into from
Mar 19, 2021

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Mar 19, 2021

The selectedAddress state is now reset to the first identity if the current selected address is removed during an update. This is to ensure the selectedAddress is never set to an address that is not present in state.

This was already being done manually after each invocation of updateIdentities where account removal was anticipated. For mobile this is mostly a non-functional change, except that now this update happens in a single state update rather than over the course of two successive updates.

@Gudahtt Gudahtt requested a review from a team as a code owner March 19, 2021 17:05
@Gudahtt Gudahtt force-pushed the update-selected-address-after-updating-identities branch from dd2e506 to bdc0cc1 Compare March 19, 2021 20:12
The `selectedAddress` state is now reset to the first identity if the
current selected address is removed during an update. This is to ensure
the `selectedAddress` is never set to an address that is not present in
state.

This was already being done manually after each invocation of
`updateIdentities` where account removal was anticipated. For mobile
this is mostly a non-functional change, except that now this update
happens in a single state update rather than over the course of two
successive updates.
@Gudahtt Gudahtt force-pushed the update-selected-address-after-updating-identities branch from bdc0cc1 to f1fc179 Compare March 19, 2021 20:58
@Gudahtt Gudahtt merged commit 47fbfa5 into develop Mar 19, 2021
@Gudahtt Gudahtt deleted the update-selected-address-after-updating-identities branch March 19, 2021 21:40
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The `selectedAddress` state is now reset to the first identity if the
current selected address is removed during an update. This is to ensure
the `selectedAddress` is never set to an address that is not present in
state.

This was already being done manually after each invocation of
`updateIdentities` where account removal was anticipated. For mobile
this is mostly a non-functional change, except that now this update
happens in a single state update rather than over the course of two
successive updates.
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The `selectedAddress` state is now reset to the first identity if the
current selected address is removed during an update. This is to ensure
the `selectedAddress` is never set to an address that is not present in
state.

This was already being done manually after each invocation of
`updateIdentities` where account removal was anticipated. For mobile
this is mostly a non-functional change, except that now this update
happens in a single state update rather than over the course of two
successive updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants