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

Add Degen Mode, swap settings panel #5963

Merged
merged 11 commits into from
Jul 30, 2024
Merged

Add Degen Mode, swap settings panel #5963

merged 11 commits into from
Jul 30, 2024

Conversation

christianbaroni
Copy link
Member

@christianbaroni christianbaroni commented Jul 27, 2024

Fixes APP-1677

What changed (plus any additional context for devs)

  • Adds a swap settings panel, which contains the following settings:
    • Degen Mode
      • If enabled, the review sheet is skipped, and Flashbots and slippage settings are relocated to the settings sheet
    • Preferred Network
      • Defaults to Auto
      • If a preferred network is set, the default input asset logic is adjusted to prefer the highest-value asset on the specified network, if one exists — otherwise falls back to the overall highest-value asset
  • Adds a reusable ChainContextMenu component
  • Fixes animated image flickering in the swap coin icons and the dapp browser search results
  • Migrates usages of GestureHandlerV1Button to GestureHandlerButton (RNGH v1 → v2)
    • Leaves one instance of GestureHandlerV1Button in SwapSlider because it relies on the ref prop
  • Fixes issues causing slippage not to update when the input asset network changes
    • Previously, the default slippage value was set only once when the swap UI was initially mounted — it wasn't being updated when the input asset network was changed. Now, if the user hasn't overridden the default value, slippage will update to the correct default when the input asset network changes.
  • Fixes the 3_homeScreen e2e test and increases the max number of parallel workers, which speeds up tests a bit

Screen recordings / screenshots

RPReplay_Final1722110339.MP4

What to test

  • Swapping with Degen Mode enabled/disabled
  • Setting a preferred network

Leaves one instance of GestureHandlerV1Button in SwapSlider because it relies on the ref prop
Previously, the default slippage value was set only once when the swap UI was initially mounted — it wasn't being updated when the input asset network was changed. Now, if the user hasn't overridden the default value, slippage will update to the correct default when the input asset network changes.
@jinchung jinchung merged commit 5abbbab into develop Jul 30, 2024
6 checks passed
@jinchung jinchung deleted the @christian/degen-mode branch July 30, 2024 17:07
BrodyHughes added a commit that referenced this pull request Aug 1, 2024
…inbow into brody/enable-android-tests

* 'brody/enable-android-tests' of github.com:rainbow-me/rainbow:
  degen mode feature flag (#5969)
  Fix Android dapp browser gestures (#5964)
  Add Degen Mode, swap settings panel (#5963)
  Update flipping logic in SwapInputsController (#5948)
  Hold to swap button (#5920)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants