diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index a5746ae6e..a31949108 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -176,7 +176,7 @@ function renderNotificationSVG(content, cb){ } function svgWrapper(content){ - var wrapperSource = ` + var wrapperSource = ` {{content}} @@ -188,4 +188,4 @@ function svgWrapper(content){ function toSvgUri(content){ return 'data:image/svg+xml;utf8,' + encodeURIComponent(content) -} \ No newline at end of file +} diff --git a/app/scripts/popup.js b/app/scripts/popup.js index 5173507fa..5c5cf0455 100644 --- a/app/scripts/popup.js +++ b/app/scripts/popup.js @@ -65,11 +65,21 @@ function getCurrentDomain (cb) { }) } +function clearNotifications(){ + chrome.notifications.getAll(function (object) { + for (let notification in object){ + chrome.notifications.clear(notification) + } + }) +} + function setupApp (err, opts) { if (err) { alert(err.stack) throw err } + + clearNotifications() var container = document.getElementById('app-content') diff --git a/ui/app/app.js b/ui/app/app.js index 8a51f968b..80521d220 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -355,4 +355,3 @@ App.prototype.toggleMetamaskActive = function () { this.props.dispatch(actions.lockMetamask(false)) } } - 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)) } -