From 29e83d71a82bfdbeadc9fbecfa97d73ef11fecfb Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 13 Jan 2017 02:00:11 -0800 Subject: background - handle tx finalization in controllers instead of provider-engine --- app/scripts/keyring-controller.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'app/scripts/keyring-controller.js') diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index d4c0d863e..df2910187 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -317,13 +317,11 @@ module.exports = class KeyringController extends EventEmitter { // This method signs tx and returns a promise for // TX Manager to update the state after signing - signTransaction (ethTx, selectedAddress, txId) { - const address = normalize(selectedAddress) - return this.getKeyringForAccount(address) + signTransaction (ethTx, _fromAddress) { + const fromAddress = normalize(_fromAddress) + return this.getKeyringForAccount(fromAddress) .then((keyring) => { - return keyring.signTransaction(address, ethTx) - }).then((tx) => { - return {tx, txId} + return keyring.signTransaction(fromAddress, ethTx) }) } // Add Unconfirmed Message -- cgit