-
Notifications
You must be signed in to change notification settings - Fork 7
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
QA bug fixes #1305
QA bug fixes #1305
Conversation
✅ Deploy Preview for fractal-framework-interface-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
node: { daoName, daoAddress }, | ||
} = useFractal(); | ||
const { t } = useTranslation('treasury'); | ||
const treasuryTotal = useTreasuryTotalBN(); | ||
const showButton = user.votingWeight.gt(0) && !treasuryTotal.isZero(); | ||
const { canUserCreateProposal } = useSubmitProposal(); |
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.
canUserCreateProposal
is retrieved from voting strategy contract, so this change fixes both bugs when min threshold for voting power is 0 and user have 0 tokens, but button doesn't appear. As well as bug when user don't have enough voting power to create proposal, but the button is still there
newCanVote = user.votingWeight.gt(0) && !hasVoted; | ||
newCanVote = | ||
( | ||
await ozLinearVotingContract!.asSigner.getProposalVotingSupply(proposal.proposalId) |
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.
This eventually gets past total supply for proposal's startBlock
@@ -199,7 +199,7 @@ export function DelegateModal({ close }: { close: Function }) { | |||
!!errors.address || | |||
contractCallPending || | |||
!values.address || | |||
azoriusGovernance.votesToken?.balance?.isZero() |
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.
Allow delegating to yourself when tokens balance is 0.
@@ -199,7 +199,7 @@ export function DelegateModal({ close }: { close: Function }) { | |||
!!errors.address || | |||
contractCallPending || | |||
!values.address || | |||
azoriusGovernance.votesToken?.balance?.isZero() | |||
values.address === azoriusGovernance.votesToken?.delegatee |
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.
Disable button when user entered same address as current delegatee
await Promise.all([ | ||
ozLinearVotingContract.asSigner.votingPeriod(), | ||
ozLinearVotingContract.asSigner.quorumNumerator(), | ||
ozLinearVotingContract.asSigner.QUORUM_DENOMINATOR(), |
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.
Even though QUORUM_DENOMINATOR
is currently hardcoded - it might change in future. In order to have this case supported - we just fetching that from the contract
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.
#1201
seems not fixed to me ❌
I'm still able to cast votes on proposals that were created when my account had 0 voting tokens delegated to it
see: https://deploy-preview-1305--fractal-framework-interface-dev.netlify.app/daos/0x9E7A8CCEC8a4eC98fAA0696A41f5EDbfeB8B3B67/proposals/15
#1299
seems fixed to me ✅
#1300
seems fixed to me ✅
#1301
seems fixed to me ✅
#1302
seems fixed to me ✅
#1303
seems fixed to me ✅
#1304
seems fixed to me ✅
@mudrila, i'm going to merge the QA Bug Fixes branch into both develop and main, to get those updates on production (now that DCNT and our Fractal Safe are launched!). when you get to addressing that one existing bug from this PR, please just create a new PR for it. |
Description
See linked issues
Notes
Issue / Notion doc (if applicable)
Closes #1299
Closes #1300
Closes #1201
Closes #1301
Closes #1302
Closes #1303
Closes #1304
Testing
Screenshots (if applicable)