tradingstrategy-ai / frontend

Web frontend for TradingStrategy.ai
https://tradingstrategy.ai
125 stars 23 forks source link

Investor wizard UAT: Direct user to check wallet when changing network #486

Open kenkunz opened 1 year ago

kenkunz commented 1 year ago

Issue

If MetaMask user double-clicks "change network" control, browser is brought to foreground in front of MetaMask window, so it is not clear how to proceed.

❓ prioritize: Is this worth prioritizing? seems like an edge case / likelihood of this issue will be reduced by #477

Feedback

Per @AlexTheLion123

If you double click on 'Please connect to Polygon' button, it hides the metamask popup. This is probably unavoidable as I noticed Uniswap also shows this behaviour. However, Uniswap then shows a useful popup that you need to open metamask and switch networks. Something to consider.

Proposed changes

Update copy

Change copy of "wrong network" error box to include "in MetaMask".

Handle error

Add an alert to "check your wallet to confirm network change" if we detect the following error:

inpage.js:1 MetaMask - RPC Error: Request of type 'wallet_switchEthereumChain' already pending for origin https://tradingstrategy.ai. Please wait. {code: -32002, message: "Request of type 'wallet_switchEthereumChain' alrea…r origin https://tradingstrategy.ai. Please wait."}
allozaur commented 11 months ago

Re-assigning this one to you @kenkunz as it doesn't require any new designs at the moment and is not a high priority