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

Tim/eng 2362 clicking send on the ordinal details screen opens up the #507

Conversation

teebszet
Copy link
Member

@teebszet teebszet commented Jul 6, 2023

🔘 PR Type

  • Bugfix
  • Enhancement
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

📜 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 resetting

    • in 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 tabs
  • refactored 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:

  • all pages affected:
    • send-btc, confirm-btc-tx
    • send-brc20, confirm-brc20-tx
    • ordinal-detail, send-ordinal, confirm-ordinal-tx
    • nft-detail, send-nft, confirm-nft-tx

🖼 Screenshot / 📹 Video

broadcast-account-switch.mov

✅ Review checklist

Please ensure the following are true before merging:

  • Code Style is consistent with the project guidelines.
  • Code is readable and well-commented.
  • No unnecessary or debugging code has been added.
  • Security considerations have been taken into account.
  • The change has been manually tested and works as expected.
  • Breaking changes and their impacts have been considered and documented.
  • Code does not introduce new technical debt or issues.

@linear
Copy link

linear bot commented Jul 6, 2023

ENG-2362 Clicking send on the ordinal details screen opens up the gallery

Clicking send on the ordinal details screen opens up the gallery, not the send screen in full screen tab. This is extremely confusing.

It should go directly into the send input screen in full screen tab.

Note: This seems to be happening after you switch accounts. After you press send once and open the gallery, the second time you press send it will actually go to the input screen.

image.png

@teebszet teebszet changed the base branch from develop to ledger-btc-mvp July 6, 2023 11:25
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

build: https://api.github.com/repos/secretkeylabs/xverse-web-extension/actions/artifacts/789029098/zip

Please note that files only stay for around 30 days

@teebszet teebszet requested a review from dhriaznov July 6, 2023 11:30
src/manifest.json Outdated Show resolved Hide resolved
@teebszet teebszet force-pushed the tim/eng-2362-clicking-send-on-the-ordinal-details-screen-opens-up-the branch from a3bf8be to 4e9bcef Compare July 7, 2023 02:56
@teebszet teebszet requested a review from yknl July 7, 2023 05:09
@teebszet teebszet merged commit d0b6254 into ledger-btc-mvp Jul 7, 2023
@teebszet teebszet deleted the tim/eng-2362-clicking-send-on-the-ordinal-details-screen-opens-up-the branch November 23, 2023 07:12
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.

None yet

3 participants