Skip to content

Commit

Permalink
Merge pull request austintgriffith#221 from MaxStalker/bugfix/215-zer…
Browse files Browse the repository at this point in the history
…o-cents

Parse float value from url instead of integer
  • Loading branch information
MaxStalker authored Jul 15, 2019
2 parents 3aca711 + 1de291d commit 8e0c9bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/SendByScan.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ class SendByScan extends Component {
this.props.returnToState(returnState)
// NOTE: We only need the address and the amount as absolutely necessary
// parts of the QR code scan. `message` is optional.
} else if(Web3.utils.isAddress(dataSplit[0]) && !isNaN(parseInt(dataSplit[1], 10))) {
} else if(Web3.utils.isAddress(dataSplit[0]) && !isNaN(parseFloat(dataSplit[1], 10))) {
const returnState = {
toAddress: dataSplit[0],
amount: parseInt(dataSplit[1], 10)
amount: parseFloat(dataSplit[1], 10)
}
if (dataSplit.length > 1) {
returnState.message = dataSplit[2]
Expand Down

0 comments on commit 8e0c9bb

Please sign in to comment.