Skip to content

Commit

Permalink
use ethers module to format ether
Browse files Browse the repository at this point in the history
  • Loading branch information
Leibniz137 committed Feb 21, 2021
1 parent e9cdf61 commit a6c9139
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/keep-benefits/src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { formatEther } from '@ethersproject/units';
import { ethers } from 'ethers';
import React from 'react';
import { useWeb3React } from '@web3-react/core';
Expand Down Expand Up @@ -150,7 +149,7 @@ function Balance () {
return (
<div>
<p>
Current Account Balance: {balance === null ? 'Error' : balance ? ${formatEther(balance)}` : ''}
Current Account Balance: {balance === null ? 'Error' : balance ? ${ethers.formatEther(balance)}` : ''}
</p>
</div>
);
Expand Down

0 comments on commit a6c9139

Please sign in to comment.