diff options
idStore - cancel tx
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/background.js | 1 | ||||
-rw-r--r-- | app/scripts/lib/idStore.js | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 4dc92cea5..6a1b7404f 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -79,6 +79,7 @@ function handleInternalCommunication(remotePort){ submitPassword: idStore.submitPassword.bind(idStore), setSelectedAddress: idStore.setSelectedAddress.bind(idStore), signTransaction: idStore.signTransaction.bind(idStore), + cancelTransaction: idStore.cancelTransaction.bind(idStore), setLocked: idStore.setLocked.bind(idStore), }) duplex.pipe(connection).pipe(duplex) diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 0dfc4deed..73992caa4 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -131,6 +131,14 @@ IdentityStore.prototype.signTransaction = function(password, txId, cb){ }) } +IdentityStore.prototype.cancelTransaction = function(txId){ + const self = this + + var txData = self._currentState.unconfTxs[txId] + delete self._currentState.unconfTxs[txId] + self._didUpdate() +} + // // private // |