Skip to content

Commit

Permalink
Fix bug when calculates the checksum of the address
Browse files Browse the repository at this point in the history
  • Loading branch information
Agupane committed Feb 6, 2019
1 parent bb5fac3 commit 08efe65
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Components/Common/Hoc/Web3Provider/Web3Provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,10 @@ class Web3Provider extends Component {

/** Converts the address from uppercase to lowercase (checksum format) in order to avoid metamask bug of using both address **/
toChecksumAddress = (web3, address) => {
let checksumAddress
if (!web3 || !address) {
if (!web3 || !address || !web3.utils) {
return
}
checksumAddress = web3.utils.toChecksumAddress(address)
return checksumAddress
return web3.utils.toChecksumAddress(address)
}

render() {
Expand Down

0 comments on commit 08efe65

Please sign in to comment.