From 435179856ff148cc5c4c64680848f407b30587c3 Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 10 Feb 2016 11:47:05 -0800 Subject: idmgmt - emit update on new tx --- app/scripts/lib/idmgmt.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/lib/idmgmt.js b/app/scripts/lib/idmgmt.js index 27d4e570f..7bc276041 100644 --- a/app/scripts/lib/idmgmt.js +++ b/app/scripts/lib/idmgmt.js @@ -97,7 +97,6 @@ function submitPassword(password, cb){ var state = _getState() cb(null, state) // trigger an update but dont wait for it - console.log(self) self.updateIdentities() }) } @@ -164,11 +163,7 @@ IdentityManager.prototype.updateIdentity = function(address, cb){ function getTxCount(address, cb){ provider.sendAsync(createPayload({ method: 'eth_getTransactionCount', - // we actually want the pending txCount - // but pending is broken in provider-engine - // https://github.com/MetaMask/provider-engine/issues/11 - // params: [address, 'pending'], - params: [address, 'latest'], + params: [address, 'pending'], }), function(err, res){ if (err) return cb(err) if (res.error) return cb(res.error) @@ -205,6 +200,8 @@ function tryPassword(password, cb){ } function addUnconfirmedTransaction(txParams, cb){ + var self = this + var time = (new Date()).getTime() var txId = createId() unconfTxs[txId] = { @@ -219,6 +216,9 @@ function addUnconfirmedTransaction(txParams, cb){ // otherwise we need to keep the cb around // signTransaction(txId, cb) unconfTxCbs[txId] = cb + + // signal update + self._didUpdate() } // called from -- cgit v1.2.3