appkit icon indicating copy to clipboard operation
appkit copied to clipboard

Using WalletConnect and getPastEvents after window refocus leads to null signature.

Open transmissions11 opened this issue 6 years ago • 3 comments

When fetching past events using getPastEvents from contracts after you refocus to a window that uses web3 with walletconnect (with web3modal), I get an event missing a lot of its data?

To reproduce I stop focusing on the window (switch tabs or open another app) and return to the window, fetching contract events will have empty returnValues, a null signature and an undefined event field.

Normal: ScreenShot- 337 After refocus: ScreenShot- 336

Contract event fetching code:

ScreenShot-

transmissions11 avatar Aug 24 '20 06:08 transmissions11

Can you diagnose this further and check the raw network traffic in the web console? I think the next step would be to pin down if this is because of network event gets coming through fully for some browser reason or network event come through, but JavaScript is not processing it.

miohtama avatar Aug 24 '20 10:08 miohtama

The request is going through and seems normal to me?

{"jsonrpc":"2.0","id":1598293392453143,"result":[{"address":"0x6bdaf490c5b6bb58564b3e79c8d18e8dfd270464","blockHash":"0x5444f3c432d135c4de300e628bd71eb5e1a8a8be1d833adbc6191db0dd05f977","blockNumber":"0xa1e63f","data":"0x0000000000000000000000000000000000000000000000010ef82bf6214340c50000000000000000000000000000000000000000000000010ef82bf6214340c50000000000000000000000000000000000000000000000010daab71694cb5298","logIndex":"0x41","removed":false,"topics":["0xb78af891b0e8c2e617c2a91471c40accb2559e2aa533b41746a9d2e580b4bc33","0xa5e92f3efb6826155f1f728e162af9d7cda33a574a1153b58f03ea01cc37e568","0x000000000000000000000000b6b79d857858004bf475e4a57d4a446da4884866","0x0000000000000000000000007ed52863829ab99354f3a0503a622e82acd5f7d3"],"transactionHash":"0x36aa18a186395bd070dccb9fa4736f55a08d9729a83f145d2fe60286bf43bc36","transactionIndex":"0x4f"},{"address":"0x6bdaf490c5b6bb58564b3e79c8d18e8dfd270464","blockHash":"0x1899b16f53e26cab79387d3aa6b84668365876c7cabecb49968d5f277f832c35","blockNumber":"0xa1e90c","data":"0x0000000000000000000000000000000000000000000000086952060beaa1d0000000000000000000000000000000000000000000000000086952060beaa1d0000000000000000000000000000000000000000000000000085ef24c1772d075f3","logIndex":"0xcd","removed":false,"topics":["0xb78af891b0e8c2e617c2a91471c40accb2559e2aa533b41746a9d2e580b4bc33","0xa5e92f3efb6826155f1f728e162af9d7cda33a574a1153b58f03ea01cc37e568","0x000000000000000000000000b6b79d857858004bf475e4a57d4a446da4884866","0x0000000000000000000000007ed52863829ab99354f3a0503a622e82acd5f7d3"],"transactionHash":"0xf0290edbc73e6e02ee3932adda9dfcab41ff14c6ff3466f1325031bb164bb466","transactionIndex":"0xd8"}]}

transmissions11 avatar Aug 24 '20 18:08 transmissions11

Hello there. I have the same issue. @transmissions11 could you tell me please how it was solved?

Antroll avatar Aug 12 '22 15:08 Antroll