extension icon indicating copy to clipboard operation
extension copied to clipboard

Connection Window "cascade pop up's" when connecting to zkveggies.com

Open nico186 opened this issue 2 years ago • 6 comments

Discord Discussion Link

https://discord.com/channels/808358975287722045/888500174685614090/1108437200456138783

What browsers are you seeing the problem on?

Chrome

What were you trying to do?

I noticed a strange bug when connecting v32.0 to a project on ZK Sync Era.

What did not work?

When I go to zkveggies.com on chrome Extension, and use the zksync network (by accessing Taho-Chain List Feature), a series of 16 - 50 or so "pop ups" appear. I am not able to select any of them as they open in rapid succession.

I was able to wait, and at intervals the cascade will stop, nd the "connect" button illuminates - but I was afraid to click "connect". I gave it a little time and the "series" of cascades, with a pause, continued in a cycle.

After I closed the website, I noticed all of the pop ups - 50 or so - were open and I had to close them one by one.

Version

v0.32.0

Relevant log output

No response

nico186 avatar May 17 '23 17:05 nico186

This (and probably other instances of infinite popups) appears to be due to sites that are using useEffect very poorly, resulting in repeated calls to requestAccounts even when the first call has not yet received a positive or negative response. Other wallets just immediately fail requests from windows that have a request already pending, which I imagine is what we'll want to do here as well.

I'll take this one.

Shadowfiend avatar May 17 '23 19:05 Shadowfiend

Awesome! this makes a lot of sense, it describes what was happening when I tried to connect using Taho. I also tested the My Ethereum and Zerion Wallets to connect to this site, both on mobile connecting to zkveggies.com in wallet browsers, and I had the same experience - repeated calls caused cascading windows.

I am happy to test the site again or provide any feedback if helpful.

nico186 avatar May 17 '23 22:05 nico186

Thank you! I’ll let you know when we have something to test!

Shadowfiend avatar May 17 '23 23:05 Shadowfiend

Dev Team is On Point! LFG Taho :)

nico186 avatar May 17 '23 23:05 nico186

GM @Shadowfiend, I took V36.0 for a spin this morning and successfully connected to ZK Veggies site. It seems like the fix you mentioned is working, I simply installed V36, added ZK Era network, and connected right away (no cascading). Our Logo still appears at "Tally" in the wallet selection link but I assume that is on the Web3 Modal library end?

Awesome work (to all) on all these incredible features and updates!!!!!

nico186 avatar Jun 08 '23 14:06 nico186

Sorry for not getting back—I don't believe I actually fixed the underlying bug I found here, but zkveggies probably fixed the poor use of useEffect on their end. Either way need to fix the underlying bits and will pick that up soon :)

Shadowfiend avatar Jun 27 '23 17:06 Shadowfiend