diff --git a/components/VotingSummary.tsx b/components/VotingSummary.tsx index e01befe..e5ec028 100644 --- a/components/VotingSummary.tsx +++ b/components/VotingSummary.tsx @@ -1,12 +1,12 @@ import React from "react"; import { BorderedPanel } from "./BorderedPanel"; -import { noDecimals, toCurrency } from "../services/format"; +import { withDecimals, noDecimals, toCurrency } from "../services/format"; import { IVoting } from "../services/types"; import { Address } from "./Ethscan"; const ucFirst = (s: string): string => { return s.charAt(0).toUpperCase() + s.slice(1); -} +}; export const VotingSummary = (props: IVoting) => { const title = `API3 DAO ${ucFirst(props.status)} Proposal`; @@ -39,9 +39,12 @@ export const VotingSummary = (props: IVoting) => { {noDecimals(toCurrency(props.transferValue))} {" "} - {props.transferToken}{" "} - to{" "} -
+ {props.transferToken} to{" "} +
) : null} {statusText ?
{statusText}
: null} @@ -62,9 +65,7 @@ export const VotingSummary = (props: IVoting) => { ) : ( -
- Nobody voted for -
+
Nobody voted for
)} @@ -79,7 +80,11 @@ export const VotingSummary = (props: IVoting) => { votes against this proposal
- {props.totalAgainst.mul(100).div(props.totalStaked).toFixed(4)}% + {props.totalAgainst + .mul(100) + .div(props.totalStaked) + .toFixed(4)} + %
) : ( @@ -105,7 +110,7 @@ export const VotingSummary = (props: IVoting) => {
Spent{" "} - {toCurrency(props.totalGasUsed)} + {withDecimals(props.totalGasUsed + "", 7)} {" "} ETH in fees, Est{" "}