Closed laurenluz closed 1 month ago
I tested this out a bit more and was able to reproduce this issue, in order to repro:
The expected behaviour is that if you connect to giveth from any network we support you are not prompted to switch to a specific network, unless on some certain conditions - such as the donate page to switch network when a project doesn't accept donations from your currently connected network.
As a side note, some users might be getting signed out automatically because of this other bug related to QF page #4379
Thanks @divine-comedian! so much more clear <3
@mateodaza says it is related to #4401 and could be solved when the PR is merged
- Sign into Giveth with Ethereum on any given network that we support
- Sign out on Giveth, switch network on metamask
- Sign into Giveth again
- See prompt from MM for you to switch network (this is the bug)
Based on these steps I couldn't reproduce it Did I follow the steps correctly? @divine-comedian
https://github.com/Giveth/giveth-dapps-v2/assets/111529185/2f20c10c-858c-4a22-9adc-506f5fd71262
That isn't the right flow to test it unfortunately - here is a quick video to show the error, which still persists.
https://github.com/Giveth/giveth-dapps-v2/assets/67759413/8e09e878-edf3-4368-8f36-dcb3d86d06e2
Thanks @divine-comedian I've also seen the same error on production now that I'm forced to switch from Celo to OP
@mateodaza - please take a look at this
@divine-comedian @laurenluz @maryjaf I looked everywhere to find a configuration but seems like the default behavior goes like...
The solution I suggest is to always ask for a network before picking the wallet on the first sign-ups, showing this modal initially
do you like this ux? I have a branch set with this config explained so you can check it out here
ps: I believe it's a feature and not a bug from web3modal to be "smart" and always remember to go back to your last session, tried this with other connectors (rainbowkit) and the behavior is different, anyway they do have a config to always default a singular chain but we're multi-chain so it doesn't help us
@mateodaza thanks! I tested it out and I think it's okay... one more change while you're in there...
from the navbar when a user clicks "Switch Network" we should also show the same "choose network" view like the one you've shown above. when a user requests to switch network on our app we should avoid showing this modal:
here's a short video showing the current flow, from your feature branch:
https://github.com/user-attachments/assets/1e04bd77-fdb9-4f8b-baaa-69db416998b3
I tried connecting my metamask to Giveth with my wallet on gnosis chain. to connect, I had to sign a message... but then it was trying to make me switch to polygon... I rejected the network switch... but then it said the connect wallet failed.
It basically didn't allow me to connect my wallet until I allowed giveth to switch the network... and then I could switch back to gnosis to actually make the donation.
Weird bug.
@divine-comedian who is the right person to address this?