Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Safeguarding variable value.
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonfraga committed Nov 19, 2018
1 parent 65c5f88 commit 2a9072b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interface/components/TxHistory/TxRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TxRow extends Component {
valueToEtherAmount = value => {
const theValue = web3.utils.isHex(value)
? new BigNumber(web3.utils.hexToNumberString(value))
: new BigNumber(value);
: new BigNumber(value || 0);
const etherAmount = theValue
.dividedBy(new BigNumber('1000000000000000000'))
.toFixed();
Expand Down

0 comments on commit 2a9072b

Please sign in to comment.