-
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
DAO-842 Updated logic to correctly match allocation balance checking … #396
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
d5f493d
to
1c8673f
Compare
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.
LGTM
query: { | ||
enabled: false, | ||
refetchInterval: 10000, |
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.
We are usually using 30 seconds since It's when the block changes.
const parsedAmount = parseEther(amount) ?? 0n | ||
const parsedBalance = parseEther(stRifBalance) ?? 0n | ||
const balanceThatCanBeWithdraw = parsedBalance - (backerTotalAllocation || 0n) |
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.
@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
…process.