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

Remove unnecessary redirection / code from Swaps, update content #21935

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

dan437
Copy link
Contributor

@dan437 dan437 commented Nov 22, 2023

Description

This PR solves 3 things:

  • There was an issue with duplicated redirection to the Notification Page (which we already do here), which caused unnecessary redirects between the Prepare Swap Page and Notification Page in Swaps.
  • Also, we had some duplicated code that was not needed after Swaps redesign and because of that we showed the Notification Page (see the screenshot), instead of fetching quotes again on the Prepare Swap Page, which would save users some time.
  • Update content (Start swapping -> Enable Smart Swaps)

Why the removed code was not needed:

The functions that were used from the deleted code are still used in the old Swaps design (our fallback solution). Once we will be cleaning up the old Swaps design code, those functions will be removed as well.

Screenshots

Updated content:
image

Notification page:
image

Testing Steps

Test 1 - make sure Swaps work and we still show the Notification Page if a user stayed on the Prepare Swap Page too long with everything filled in

Test 2 - Show the Prepare Swap Page instead of the Notification Page after clicking on the "Try Again" link:

  • Open Swaps
  • Make sure Smart Swap is enabled
  • Make a swap and immediately cancel it
  • Wait on the Smart Transaction Status page for 5 minutes
  • Click on the "Try Again" button
  • See that you will be redirected to Prepare Swap Page and new quotes fetching will start instead of going to the Notification Page

@dan437 dan437 added release-blocker This bug is blocking the next release release-11.6.0 Issue or pull request that will be included in release 11.6.0 labels Nov 22, 2023
@dan437 dan437 requested a review from a team as a code owner November 22, 2023 11:47
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 metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 22, 2023
@dan437 dan437 changed the title Remove unnecessary redirection / code from Swaps Remove unnecessary redirection / code from Swaps, update content Nov 22, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [bf4f198]
Page Load Metrics (683 ± 257 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint82138100157
domContentLoaded6611188147
load781380683536257
domInteractive6611188147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -279 Bytes (-0.00%)
  • common: 7 Bytes (0.00%)

Copy link
Contributor

@davibroc davibroc left a comment

Choose a reason for hiding this comment

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

I have tested it and seems that the bug has been fixed

@dan437 dan437 merged commit 74624fe into develop Nov 22, 2023
13 checks passed
@dan437 dan437 deleted the remove-duplicated-redirection branch November 22, 2023 18:31
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2023
@metamaskbot metamaskbot added the release-11.7.0 Issue or pull request that will be included in release 11.7.0 label Nov 22, 2023
@gauthierpetetin gauthierpetetin removed the release-11.7.0 Issue or pull request that will be included in release 11.7.0 label Jan 2, 2024
@metamaskbot
Copy link
Collaborator

More than one release label on PR. Keeping the lowest one (release-11.6.0) on PR and removing other release labels (release-11.7.0).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-11.6.0 Issue or pull request that will be included in release 11.6.0 release-blocker This bug is blocking the next release team-swaps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants