ethereum / clrfund

Eth2 CLR project built on clr.fund

Home Page:https://eth2clrfund.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recipient list is not being updated

pettinarip opened this issue · comments

The recipients list in /recipients is not updating automatically when a request is accepted.

E.g. here, the first request in the list has already been accepted and the list keeps showing the previous state.
1

So this seems to be working locally, but I imagine there is something going on in the testnet/mainnet instances of this. @pettinarip I saw this piece of code:

// TODO: this is not ideal. Leaving as is, just because it is an admin
          // page where no end user is using. We are forcing this 2s time to give
          // time the subgraph to index the new state from the tx. Perhaps we could
          // avoid querying the subgraph and query directly the chain to get the
          // request state.
          await new Promise((resolve) => {
            setTimeout(async () => {
              await this.loadRequests()
              resolve()
            }, 2000)
          })

Do you think something around the 2s timeout is what is causing this?

Do you think something around the 2s timeout is what is causing this?

Maybe. Its hard to reproduce locally. You could try to sleep(2000) the tx promise for a couple of seconds to imitate the tx mining behavior and see if that is the issue.

But I wouldn't worry too much about this issue tbh since it is an admin page. If you can't reproduce it easily I would say to abandon it.