Tim/eng 2362 clicking send on the ordinal details screen opens up the #507
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔘 PR Type
📜 Background
more full screen tab issues when switching accounts.
this fixes the logic where a user could switch account from gallery, then when clicking send, be taken back to gallery
Issue Link: https://linear.app/xverseapp/issue/ENG-2362/clicking-send-on-the-ordinal-details-screen-opens-up-the-gallery
Context Link (if applicable):
🔄 Changes
added a check in account switch logic to only reset user flows if we detect open extension tabs and at least one tab is on a page which needs resettingin order to do that check, we added "tabs" permissions to the chrome extension. this is inevitable if we are going to be doing more interactions between extension popup and tabs, and need to know about open extension tabsrefactored to use broadcast channel instead of persisted redux state
added logic to also return user from nft-detail and ordinal-detail pages to gallery on account switch. this is because a user could be browsing a stacks nft detail page and do account switch, and then there is no guard against user trying to send an nft from the wrong account. if we were to check that the active account owns the nft here, we would have to paginate through the accounts entire nft set.
added logic to send-brc20 and confirm-brc20-tx pages to also reset on account switch
Impact:
🖼 Screenshot / 📹 Video
broadcast-account-switch.mov
✅ Review checklist
Please ensure the following are true before merging: