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

Xtz polls #769

Merged
merged 13 commits into from
Feb 20, 2024
Merged

Xtz polls #769

merged 13 commits into from
Feb 20, 2024

Conversation

fabiolalombardim
Copy link
Contributor

Closes #763 #764

Copy link

netlify bot commented Jan 30, 2024

Deploy Preview for tezos-homebase ready!

Name Link
🔨 Latest commit 673f3b3
🔍 Latest deploy log https://app.netlify.com/sites/tezos-homebase/deploys/65cfaa57e108b800080e94a7
😎 Deploy Preview https://deploy-preview-769--tezos-homebase.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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,
Copy link
Collaborator

@Man-Jain Man-Jain Feb 8, 2024

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.

Copy link
Contributor Author

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)}
Copy link
Collaborator

@Man-Jain Man-Jain Feb 8, 2024

Choose a reason for hiding this comment

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

Same XTZ Decimals - 18

Copy link
Contributor Author

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),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same XTZ Decimals - 18

Copy link
Contributor Author

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)
Copy link
Collaborator

@Man-Jain Man-Jain Feb 8, 2024

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.

Copy link
Contributor Author

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(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same XTZ Decimals - 18

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix! - Decimals 6

Copy link
Collaborator

@Man-Jain Man-Jain left a comment

Choose a reason for hiding this comment

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

Left some comments

@Man-Jain Man-Jain merged commit 4ad9483 into develop Feb 20, 2024
6 checks passed
@Man-Jain Man-Jain deleted the xtz-polls branch February 20, 2024 19:30
@fabiolalombardim fabiolalombardim self-assigned this Feb 25, 2024
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.

2 participants