From bc2ec9f464150507f00a7653a4504644853dd666 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 12 Feb 2016 12:55:20 -0800 Subject: [PATCH] idStore - cancel tx --- app/scripts/background.js | 1 + app/scripts/lib/idStore.js | 8 ++++++++ 2 files changed, 9 insertions(+) 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 //