-
Notifications
You must be signed in to change notification settings - Fork 13
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
Xtz polls #769
Conversation
✅ Deploy Preview for tezos-homebase ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -85,14 +87,19 @@ export const ProposalDetails: React.FC<{ id: string }> = ({ id }) => { | |||
} | |||
}) | |||
|
|||
const dataForBack = { | |||
isXTZ: poll?.isXTZ, |
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.
Don't think we need this now. Should change it to what it was earlier.
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.
fixed!
@@ -174,17 +187,17 @@ export const VoteDetails: React.FC<{ poll: Poll | undefined; choices: Choice[]; | |||
justifyContent={isMobileSmall ? "flex-start" : "flex-end"} | |||
> | |||
<Typography color="textPrimary" variant="body1"> | |||
{nFormatter(calculateProposalTotal(choices, tokenData?.decimals), 1)} | |||
{numbro(calculateProposalTotal(choices, isXTZ ? 0 : tokenData?.decimals)).format(formatConfig)} |
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.
Same XTZ Decimals - 18
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.
fix!
</Typography> | ||
<Typography color="textPrimary" variant="body1"> | ||
{poll?.tokenSymbol} | ||
</Typography> | ||
<Typography color="textPrimary" variant="body1"> | ||
( | ||
{getTreasuryPercentage( | ||
calculateProposalTotal(choices, tokenData?.decimals), | ||
calculateProposalTotal(choices, isXTZ ? 0 : tokenData?.decimals), |
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.
Same XTZ Decimals - 18
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.
fix! - Decimals 6
@@ -110,7 +119,11 @@ export const VoteDetails: React.FC<{ poll: Poll | undefined; choices: Choice[]; | |||
{choice && choice.walletAddresses ? ( | |||
<Typography color="textPrimary" variant="body2"> | |||
{choice.walletAddresses.length} Voters -{" "} | |||
{nFormatter(calculateChoiceTotal(choice.walletAddresses, tokenData?.decimals), 1)}{" "} | |||
{!isMobile | |||
? nFormatter(calculateChoiceTotal(choice.walletAddresses, isXTZ ? 0 : tokenData?.decimals), 1) |
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.
XTZ decimals is 18 by default. Unless it's a different case with the data we're getting in this case from the API or Homebase Backend. Do check this once please.
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.
fix! - Decimals 6
{nFormatter(calculateChoiceTotal(choice.walletAddresses, tokenData?.decimals), 1)}{" "} | ||
{!isMobile | ||
? nFormatter(calculateChoiceTotal(choice.walletAddresses, isXTZ ? 0 : tokenData?.decimals), 1) | ||
: numbro(calculateChoiceTotal(choice.walletAddresses, isXTZ ? 0 : tokenData?.decimals)).format( |
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.
Same XTZ Decimals - 18
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.
fix! - Decimals 6
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.
Left some comments
Closes #763 #764