MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.84k stars 4.83k forks source link

[Bug]: Send and swap flow for unsupported networks #25107

Open sleepytanya opened 3 months ago

sleepytanya commented 3 months ago

Describe the bug

In the context of the send+swap flow on unsupported networks, considering the substantial user base operating within these networks, introducing a notification system or potentially disabling this feature for networks beyond the mainnet and BNB might significantly improve the user experience. Currently, when users on unsupported networks attempt to use the send+swap feature, they are allowed to select a destination token, only to encounter 'No quotes available' for the native token and 'Error fetching quotes' for other tokens. A more user-friendly approach could involve defaulting to the regular send flow for non-supported networks (removing the option to select a destination token).

Expected behavior

-

Screenshots/Recordings

Screenshot 2024-06-05 at 23 39 13 Screenshot 2024-06-05 at 23 40 47

Steps to reproduce

  1. Connect to unsupported network (e.g., Polygon, Arbitrum, etc.)
  2. Start send+swap flow
  3. Select native token as an origin token and any other token for the destination
  4. See 'No quotes available' message
  5. Select non-native token as an origin
  6. Select any token as a destination token
  7. 'Error fetching quotes' is shown

Error messages or log output

No response

Version

develop branch

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

BZahory commented 3 months ago

This was addressed in a meeting yesterday: https://docs.google.com/document/d/1bfuJ3oRx3KHBtCZnySJjuTJ8r4FVVqDV3Eb-xxYJ4Zs/edit#heading=h.4mo58br3ahpy

tl;dr: this is expected since the API isn't updated yet, but we expect it to be updated by mid-next week. Keeping this issue open until this actually happens

sleepytanya commented 2 months ago

Currently for unsupported networks we allow users to select destination token and then display 'No quotes available' or 'Error fetching quotes' message.

https://github.com/MetaMask/metamask-extension/assets/104780023/f11298b6-363b-4c09-b936-992c567452b7

danjm commented 2 months ago

@BZahory Why not disable the dropdown if the network is unavailable?

BZahory commented 2 months ago

@BZahory Why not disable the dropdown if the network is unavailable?

That's the current behavior. We previously assumed that all swap networks would be supported. Exact swap+send networks are now available here: https://swap.dev-api.cx.metamask.io/featureFlags; I'll make a PR to use these

metamaskbot commented 2 months ago

Missing release label release-12.0.0 on issue. Adding release label release-12.0.0 on issue, as issue is linked to PR #25474 which has this release label.

sleepytanya commented 2 months ago

The issue is present in the latest v12.0.0 build

Screenshot 2024-06-29 at 17 03 52
sleepytanya commented 1 month ago

The issue is present in the v12.0.0. beta:

Screenshot 2024-07-15 at 22 04 31 Screenshot 2024-07-15 at 22 06 13
sleepytanya commented 1 month ago

v12.0.0 branch with SWAPS_USE_DEV_APIS=true

Send+swap is not disabled on Avalanche and Linea, other popular networks seem to work as expected. Send+swap is disabled for Arbitrum and zkSync Era.

avalanceNoQoutes lineaNoQuotes
BZahory commented 1 month ago

For Linea, another route is supported. Avalanche's unavailability is related to an API bug which @callumelvidge is investigating.

Linea

Screenshot 2024-07-17 at 4 05 03 PM
sleepytanya commented 3 weeks ago

Production v12.1.0

Linea, Base and Optimism chains are not supported:

Screenshot 2024-08-09 at 18 10 32
sleepytanya commented 1 week ago

Beta 12.1.0 - Linea and Base:

Screenshot 2024-08-23 at 17 32 28 Screenshot 2024-08-23 at 17 38 21