From 219e5dc45f6726cc696ce09fa6e3b2597e24ab11 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Mon, 16 Sep 2019 17:18:31 +0400 Subject: [PATCH] Add ETH symbol, round number to 3 digits --- src/routes/open/components/ReviewInformation/index.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/open/components/ReviewInformation/index.jsx b/src/routes/open/components/ReviewInformation/index.jsx index b1fa6b03..9f95f263 100644 --- a/src/routes/open/components/ReviewInformation/index.jsx +++ b/src/routes/open/components/ReviewInformation/index.jsx @@ -85,8 +85,9 @@ const ReviewComponent = ({ values, classes, userAccount }: Props) => { const { fromWei, toBN } = web3.utils const estimatedGasCosts = await estimateGasForDeployingSafe(addresses, numOwners, userAccount) const gasCostsAsEth = fromWei(toBN(estimatedGasCosts), 'ether') + const roundedGasCosts = parseFloat(gasCostsAsEth).toFixed(3) if (isCurrent) { - setGasCosts(gasCostsAsEth) + setGasCosts(roundedGasCosts) } } @@ -164,6 +165,7 @@ const ReviewComponent = ({ values, classes, userAccount }: Props) => { wallet. The creation will cost approximately {' '} {gasCosts} + {' '} ETH . The exact amount will be determined by your wallet.