diff options
author | Frankie <frankie.diamond@gmail.com> | 2017-01-05 07:03:45 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2017-01-05 07:03:45 +0800 |
commit | cf6817092b92930ab96e1c9e610669b485b384ff (patch) | |
tree | cfa92fa6bbdcd0be1dfbab5d805cf146ac81e416 /app/scripts/keyring-controller.js | |
parent | 4b17222a5994166e01486698803896fd2d60043c (diff) | |
download | tangerine-wallet-browser-cf6817092b92930ab96e1c9e610669b485b384ff.tar tangerine-wallet-browser-cf6817092b92930ab96e1c9e610669b485b384ff.tar.gz tangerine-wallet-browser-cf6817092b92930ab96e1c9e610669b485b384ff.tar.bz2 tangerine-wallet-browser-cf6817092b92930ab96e1c9e610669b485b384ff.tar.lz tangerine-wallet-browser-cf6817092b92930ab96e1c9e610669b485b384ff.tar.xz tangerine-wallet-browser-cf6817092b92930ab96e1c9e610669b485b384ff.tar.zst tangerine-wallet-browser-cf6817092b92930ab96e1c9e610669b485b384ff.zip |
remove unnecessary try statments
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r-- | app/scripts/keyring-controller.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 1a26a887f..c58be0aae 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -318,18 +318,12 @@ module.exports = class KeyringController extends EventEmitter { // TX Manager to update the state after signing signTransaction (ethTx, selectedAddress, txId) { - return new Promise((resolve, reject) => { - try { - const address = normalize(selectedAddress) - return this.getKeyringForAccount(address) - .then((keyring) => { - return keyring.signTransaction(address, ethTx) - }).then((tx) => { - resolve({tx, txId}) - }) - } catch (e) { - reject(e) - } + const address = normalize(selectedAddress) + return this.getKeyringForAccount(address) + .then((keyring) => { + return keyring.signTransaction(address, ethTx) + }).then((tx) => { + return {tx, txId} }) } // Add Unconfirmed Message |