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

DAO-842 Updated logic to correctly match allocation balance checking … #396

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

Freshenext
Copy link
Contributor

…process.

Copy link

github-actions bot commented Nov 22, 2024

Dependency Review

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

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@Freshenext Freshenext force-pushed the DAO-842 branch 2 times, most recently from d5f493d to 1c8673f Compare November 22, 2024 16:53
Copy link
Contributor

@franciscotobar franciscotobar left a comment

Choose a reason for hiding this comment

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

LGTM

query: {
enabled: false,
refetchInterval: 10000,
Copy link
Contributor

Choose a reason for hiding this comment

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

We are usually using 30 seconds since It's when the block changes.

Comment on lines +44 to +46
const parsedAmount = parseEther(amount) ?? 0n
const parsedBalance = parseEther(stRifBalance) ?? 0n
const balanceThatCanBeWithdraw = parsedBalance - (backerTotalAllocation || 0n)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Freshenext I think it would be better to use a useMemo to just calculate canAccountWithdraw. In the past, we experienced a strange behaviour of useReadContract that was affected by not having a useMemo to perform calculation of the useReadContracts results

@jessgusclark jessgusclark merged commit 140cfb4 into develop Nov 25, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants