How to use the @ethersproject/units.formatEther function in @ethersproject/units

To help you get started, we’ve selected a few @ethersproject/units examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NoahZinsmeister / web3-react / example / index.tsx View on Github external
? '...'
            : account === null
            ? 'None'
            : `${account.substring(0, 6)}...${account.substring(account.length - 4)}`}
        

        <span>Balance</span>
        <span aria-label="gold" role="img">
          💰
        </span>
        <span>
          {ethBalance === undefined
            ? '...'
            : ethBalance === null
            ? 'Error'
            : `Ξ${parseFloat(formatEther(ethBalance)).toPrecision(4)}`}
        </span>
      
      <hr style="{{">
      <div style="{{">
        {Object.keys(connectorsByName).map(name =&gt; {
          const currentConnector = connectorsByName[name]
          const activating = currentConnector === activatingConnector
          const connected = currentConnector === connector</div>

@ethersproject/units

Unit conversion functions for Ethereum.

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis