From 3d9bedaeea9b0485b7cfbe3255d72cfe470bcaa2 Mon Sep 17 00:00:00 2001 From: Frankie Date: Mon, 27 Jun 2016 17:07:45 -0700 Subject: Fix it so you cant send a negitavie amount of ETH --- ui/app/send.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui/app') diff --git a/ui/app/send.js b/ui/app/send.js index 4b501a7b5..540d85382 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -216,6 +216,11 @@ SendTransactionScreen.prototype.onSubmit = function () { 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)) { message = 'Recipient address is invalid.' return this.props.dispatch(actions.displayWarning(message)) @@ -234,4 +239,3 @@ SendTransactionScreen.prototype.onSubmit = function () { this.props.dispatch(actions.signTx(txParams)) } - -- cgit v1.2.3