From b84f1b053265fdabc0aaec4fa8aa3145b6fb7f51 Mon Sep 17 00:00:00 2001 From: Frankie Date: Mon, 6 Mar 2017 15:41:11 -0800 Subject: Fix issue where old txMeta object was being used to pass the txHash to the cb --- app/scripts/metamask-controller.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/scripts/metamask-controller.js') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index bd01a260d..3dddf7065 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -414,14 +414,14 @@ module.exports = class MetamaskController extends EventEmitter { self.sendUpdate() self.opts.showUnapprovedTx(txMeta) // listen for tx completion (success, fail) - self.txManager.once(`${txMeta.id}:finished`, (status) => { - switch (status) { + self.txManager.once(`${txMeta.id}:finished`, (completedTx) => { + switch (completedTx.status) { case 'submitted': - return cb(null, txMeta.hash) + return cb(null, completedTx.hash) case 'rejected': return cb(new Error('MetaMask Tx Signature: User denied transaction signature.')) default: - return cb(new Error(`MetaMask Tx Signature: Unknown problem: ${JSON.stringify(txMeta.txParams)}`)) + return cb(new Error(`MetaMask Tx Signature: Unknown problem: ${JSON.stringify(completedTx.txParams)}`)) } }) }) -- cgit v1.2.3