From bfea26d3e3d12de6ce9bbc01ad24a42d846021e5 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 6 Sep 2016 18:56:26 -0700 Subject: Ensure listener is cleaned up Also fixed bug when validating a tx with no value. --- app/scripts/metamask-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts/metamask-controller.js') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 83827ec76..5373cf0d9 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -220,7 +220,7 @@ module.exports = class MetamaskController { } enforceTxValidations (txParams) { - if (txParams.value.indexOf('-') === 0) { + if (('value' in txParams) && txParams.value.indexOf('-') === 0) { const msg = `Invalid transaction value of ${txParams.value} not a positive number.` return new Error(msg) } -- cgit v1.2.3