scaffold-eth-2
scaffold-eth-2 copied to clipboard
bug: Debug tabs behavior
Is there an existing issue for this?
- [X] I have looked through the existing issues
Which method was used to setup Scaffold-ETH 2 ?
git clone
Current Behavior
While working on https://github.com/scaffold-eth/scaffold-eth-2/pull/933 I found very strange behavior: whenever I click on tab with contract, it always change to YourContract
tab.
https://github.com/user-attachments/assets/0b67d24f-dcb2-4b53-b0f2-771051dedb43
It's not because of its index or alphabetical order, it's always YourContract
(if you have that tab, of course). Clearing localstorage doesn't help
Expected Behavior
Clicked contract tab should be chosen
Steps To Reproduce
I debugged it and understood that it was because of my other browser tab, which had only YourContract
.
So, steps:
- run default se-2 (with one contract - YourContract)
- stop your frontend app (but don't close browser tab [tab 1] )
- add another contract and deployment file for it
-
yarn deploy --reset
your contracts (or justyarn deploy
if you re-runyarn chain
) - open new browser tab [tab 2]
-
yarn start
your app - open it on new browser tab [tab 2]
Anything else?
Not sure if we need to fix it for now since it's relatively rare case and not so easy to fix. But at least we know what causes this