When fetching the block number through metamask, sometimes metamask may use a cache, which causes the use of a stale block number. And I haven't found any docs about this.
In this PR, if the block number still does not change after 8 minutes(slightly longer than one epoch), it will try to get the block number from the public node RPC service.
When fetching the block number through metamask, sometimes metamask may use a cache, which causes the use of a stale block number. And I haven't found any docs about this.
In this PR, if the block number still does not change after 8 minutes(slightly longer than one epoch), it will try to get the block number from the public node RPC service.