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

feat: persist bridge state through ToS click #29366

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

bfullam
Copy link
Contributor

@bfullam bfullam commented Dec 19, 2024

Description

Currently, clicking on Terms takes you to an external page and resets your bridge progress. We want to follow the same UX as swaps, where if the user clicks on the ToS link, the extension will close, but when the user reopens the extension, they remain on the bridge page.

Acceptance Criteria:

When clicking on the ToS link, the extension closes. But when the user re-opens the extension, they see the bridge page with tokens inputted (but not amounts)

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to bridge
  2. Put in tokens/amounts to get quote
  3. Click "terms" link
  4. Reopen extension and see inputs persisted

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@bfullam bfullam requested review from a team as code owners December 19, 2024 21:05
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [cc56cad]
Page Load Metrics (1587 ± 108 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint138421221589224107
domContentLoaded134820941564213102
load138421251587224108
domInteractive227037157
backgroundConnect96825189
firstReactRender1590432713
getState46214178
initialActions01000
loadScripts9861672118118187
setupStore611711
uiStartup156624171798263126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 511 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@bfullam bfullam enabled auto-merge December 19, 2024 23:45
Copy link
Member

@micaelae micaelae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you close the pop up or click the link in the middle of a quote fetch (with enough balance) does it abort the fetching loop in the background worker?

Copy link
Member

@micaelae micaelae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this behavior to the e2e test scenarios doc so it's not missed when qa is testing? Would be good to also add something about the hardware confirmations too

Copy link
Contributor

@infiniteflower infiniteflower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work for me. The bridge state gets reset.

@bfullam
Copy link
Contributor Author

bfullam commented Dec 20, 2024

If you close the pop up or click the link in the middle of a quote fetch (with enough balance) does it abort the fetching loop in the background worker?

@micaelae the ToS link only exists as part of the quote card, which only displays after the quotes have completed fetching

@metamaskbot
Copy link
Collaborator

Builds ready [6510e14]
Page Load Metrics (1746 ± 50 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15642009175510952
domContentLoaded15561987171210149
load15642016174610550
domInteractive248439199
backgroundConnect981392110
firstReactRender16105503115
getState45416157
initialActions01000
loadScripts1163146912997636
setupStore691162211
uiStartup170426052095237114
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 512 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

micaelae
micaelae previously approved these changes Dec 20, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [ee39ed1]
Page Load Metrics (1783 ± 86 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25520861689366176
domContentLoaded15372052176016579
load15462092178318086
domInteractive15204443918
backgroundConnect885232411
firstReactRender1685462612
getState45213136
initialActions01000
loadScripts11011561129114067
setupStore768212210
uiStartup18052393204219393
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 514 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [dd7b471]
Page Load Metrics (1682 ± 59 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22220991620345166
domContentLoaded15122031165812359
load15222041168212359
domInteractive248838199
backgroundConnect883332311
firstReactRender15102453316
getState584142010
initialActions01000
loadScripts1094143012289646
setupStore788242713
uiStartup175526222059231111
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 556 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants