Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiolalombardim committed May 28, 2024
1 parent bb9e7ab commit 8338466
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/modules/lite/explorer/components/VoteDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const VoteDetails: React.FC<{
</Grid>
</LegendContainer>
<VotesDialog
decimals={tokenData?.decimals ? tokenData?.decimals : "6"}
decimals={tokenData?.decimals}
symbol={isXTZ ? "XTZ" : tokenData?.symbol ? tokenData?.symbol : ""}
choices={choices}
groupedVotes={groupedVotes}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/lite/explorer/components/VotesDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const VotesDialog: React.FC<{
choices: Choice[]
groupedVotes: Votes[]
symbol: string
decimals: string
decimals: string | undefined
isXTZ: boolean
}> = ({ open, handleClose, choices, symbol, decimals, isXTZ, groupedVotes }) => {
const descriptionElementRef = React.useRef<HTMLElement>(null)
Expand Down Expand Up @@ -156,7 +156,7 @@ export const VotesDialog: React.FC<{
total = total.plus(new BigNumber(item.balance))
})
}
const formatted = total.div(new BigNumber(10).pow(isXTZ ? 6 : decimals))
const formatted = total.div(new BigNumber(10).pow(isXTZ ? 6 : decimals ? decimals : 0))
return formatted
}
const array: any = []
Expand Down

0 comments on commit 8338466

Please sign in to comment.