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: improve xchain swaps slippage settings with decimals and warnings #29617

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ghgoodreau
Copy link
Contributor

@ghgoodreau ghgoodreau commented Jan 9, 2025

Description

The slippage settings for xchain transactions was not allowing users to input a decimal (i.e. 0.5%), only whole numbers (0, 1, so on...). It also did not display a warning for low slippage settings. This addresses both by allowing the user to input decimal numbers, and displaying a warning when the custom slippage is set to <0.5% in the settings modal.

Open in GitHub Codespaces

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMS-1830

Manual testing steps

  1. Go to the xchain swaps transaction preparation page.
  2. Edit slippage settings.
  3. Notice decimals are now allowed, and a warning is displayed with low slippage.

Screenshots/Recordings

Before

Screenshot 2025-01-09 at 4 49 04 PM

After

Screenshot 2025-01-09 at 2 29 30 PM Screenshot 2025-01-09 at 2 29 22 PM

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.

Copy link
Contributor

github-actions bot commented Jan 9, 2025

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 [25483db]
Page Load Metrics (1627 ± 64 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24520521571332159
domContentLoaded13802038159813163
load13892047162713264
domInteractive2494382110
backgroundConnect876292211
firstReactRender1570402311
getState590202110
initialActions01000
loadScripts10041640119712761
setupStore65212136
uiStartup16102276184015776
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 291 Bytes (0.00%)
  • 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.

2 participants