-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOK-522: cycle metrics #441
base: develop
Are you sure you want to change the base?
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
import { readContract } from 'wagmi/actions' | ||
import { config } from '@/config' | ||
|
||
export const useGetTimeUntilNextCycle = (timestamp: bigint) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a look at this hook https://github.com/RootstockCollective/dao-frontend/pull/438/files#diff-ac810d5c5d8e70583cab271d6f69ec432b470e3ef9ee878023a2172d2bcff872. Maybe you could reproduce it for this abi (or generalise further) to minimise the footprint we have for each contract "service".
} | ||
const interval = setInterval(() => { | ||
setTimestamp(BigInt(DateTime.now().toUnixInteger())) | ||
}, 30000) // Update every 30 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, 30000) // Update every 30 seconds | |
}, AVERAGE_BLOCKTIME) // Update every 30 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
TOK-522