Also refactored challenge c624ab6e47851b4ad503460e769f53b788308f87 to use useScaffoldEventHistory hook with watch: true instead of useScaffoldWatchContractEvent, becauseuseScaffoldWatchContractEvent doesn't work as expected https://github.com/scaffold-eth/scaffold-eth-2/issues/838.
Code became cleaner but looks like it causes more rerenders. Tested and working well
Migration to wagmi 2.
Also refactored challenge c624ab6e47851b4ad503460e769f53b788308f87 to use
useScaffoldEventHistory
hook withwatch: true
instead ofuseScaffoldWatchContractEvent
, becauseuseScaffoldWatchContractEvent
doesn't work as expected https://github.com/scaffold-eth/scaffold-eth-2/issues/838.Code became cleaner but looks like it causes more rerenders. Tested and working well