Open steinerkelvin opened 2 months ago
think its fine to assume 8 second blocktime, so the date / hours left doesnt increase and confuse people. also chain has been hitting the target blocktime pretty reliably. should be sufficient to just display hours left till expiration
async function getTimeRemaining(expirationBlock: number) { return (expirationBlock - blockNumber) * 8; }
But how?
We can probably just multiply by the average block time. We just need to make sure it's sufficiently close to the actual target block time of 8 seconds.