Closed rin-st closed 2 months ago
I had that problem and I tried the new code @rin-st . It worked great!
Tysm @rin-st! I think this is great! Initially I had really small concern in my heart that we probably will be confusing the user of SE-2 that although they are able to see and tinker with different contracts on debug page but when using custom hooks they are limited to only using contracts from 0th chain.
^ Umm but I think since debug contracts is already dynamic and easy to get it working with contracts on all chain probably we should go for also its just limitation of custom hooks but if people use wagmi plain hook they should be able to get it working.
I think I found a small bug, to reproduce change targetNetworks: [chains.hardhat, chains.sepolia]
and then copy this :
Also probably when there are are contracts on multiple chains, we should probably show a networks dropdown somewhere which people can switch and see the contracts on other chain if not connected (since read works out of the box without needing to connect wallet) an example:
https://github.com/user-attachments/assets/44d3e2a3-1bb8-4f07-b22d-3a5f098f165e
Happy to push the code for this if it makes sense 🙌
I think I found a small bug, to reproduce change
https://github.com/user-attachments/assets/a60397ac-4ddc-4ae8-bc5d-b4fab4675f9c
It doesn't work for me. Also notice that there's no error when you added dropdown (possibly because wallet is not connected)
Happy to push the code for this if it makes sense 🙌
Sure! Thank you!
Description
Fixes debug page in case where the app uses different contracts on different chains
Before: https://github.com/user-attachments/assets/b68a96d9-25cd-4c8e-b473-3964a8146377
After: https://github.com/user-attachments/assets/47e5f585-b9e4-4288-8d7b-7810fa4c513a
Additional Information