-
Notifications
You must be signed in to change notification settings - Fork 80
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
improve preboostable logic, feedback and layout #1482
Conversation
@jellegerbrandy I am premising my findings here based on the logic given in the new comments in #739. Until you've approved those comments, I don't think we should approve this PR. So I'm blocking this one (calling it WIP) until that point. |
@@ -230,13 +230,13 @@ class ActionButton extends React.Component<IProps, IState> { | |||
/> : "" | |||
} | |||
|
|||
{ proposalState.stage === IProposalStage.Queued && proposalState.upstakeNeededToPreBoost.lt(new BN(0)) ? | |||
{ proposalState.stage === IProposalStage.Queued && proposalState.upstakeNeededToPreBoost.ltn(0) ? |
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.
are you sure this works? didn't use to, maybe they fixed it
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.
has always worked for me. testing the functionality seems to work
|
||
return ( | ||
<div className={wrapperClass}> | ||
{ | ||
proposal.stage === IProposalStage.Queued && !expired && proposal.upstakeNeededToPreBoost.gte(new BN(0)) ? | ||
!expired ? ((proposal.stage === IProposalStage.Queued && proposal.upstakeNeededToPreBoost.gten(0)) ? |
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.
I dont think this is right, cant you still boost/unboost a pre-boosted proposal that is expired? or do we want to turn that off
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.
I was misinterpreting what "expired" meant (forgetting that it often means expired only within the context of the current phase, but not necessarily that the proposal is dead, and not necessarily that the expired state is even represented yet in the blockchain).
So good catch. I have reverted the change.
<span className={css.boostedAmount}> | ||
<b> | ||
{detailView ? <img src="/assets/images/Icon/Boost-slate.svg" /> : ""} | ||
> {formatTokens(proposal.downStakeNeededToQueue.abs(), "GEN")} Pass to stay boosted | ||
> {formatTokens(proposal.downStakeNeededToQueue.abs(), "GEN")} on Pass to stay boosted |
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.
does this fit?
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.
yes
Resolves: #739
...hopefully.
Refer to the logic described in the code comments added in this client lib PR: https://github.com/daostack/client/pull/416/files
downStakeNeededToQueue