mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix it so you cant send a negitavie amount of ETH
This commit is contained in:
parent
36c7ffa585
commit
3d9bedaeea
@ -216,6 +216,11 @@ SendTransactionScreen.prototype.onSubmit = function () {
|
|||||||
return this.props.dispatch(actions.displayWarning(message))
|
return this.props.dispatch(actions.displayWarning(message))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (input < 0) {
|
||||||
|
message = 'Can not send negative amounts of ETH.'
|
||||||
|
return this.props.dispatch(actions.displayWarning(message))
|
||||||
|
}
|
||||||
|
|
||||||
if ((!util.isValidAddress(recipient) && !txData) || (!recipient && !txData)) {
|
if ((!util.isValidAddress(recipient) && !txData) || (!recipient && !txData)) {
|
||||||
message = 'Recipient address is invalid.'
|
message = 'Recipient address is invalid.'
|
||||||
return this.props.dispatch(actions.displayWarning(message))
|
return this.props.dispatch(actions.displayWarning(message))
|
||||||
@ -234,4 +239,3 @@ SendTransactionScreen.prototype.onSubmit = function () {
|
|||||||
|
|
||||||
this.props.dispatch(actions.signTx(txParams))
|
this.props.dispatch(actions.signTx(txParams))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user