Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

TOK-522: cycle metrics #441

wants to merge 1 commit into from

Conversation

franciscotobar
Copy link
Contributor

@franciscotobar franciscotobar commented Nov 30, 2024

@franciscotobar franciscotobar requested a review from a team November 30, 2024 19:53
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

import { readContract } from 'wagmi/actions'
import { config } from '@/config'

export const useGetTimeUntilNextCycle = (timestamp: bigint) => {
Copy link
Contributor

@jurajpiar jurajpiar Dec 2, 2024

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}, 30000) // Update every 30 seconds
}, AVERAGE_BLOCKTIME) // Update every 30 seconds

Copy link
Contributor

@jurajpiar jurajpiar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@antomor antomor changed the title fix: cycle metrics TOK-522: cycle metrics Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants