aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/keyring-controller.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-01-06 03:25:31 +0800
committerGitHub <noreply@github.com>2017-01-06 03:25:31 +0800
commit4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f (patch)
treeadafdb919fd4ad78c23135819000199b5ea6db75 /app/scripts/keyring-controller.js
parent00ac5ca058691c58d6401098c3d6905728f12e39 (diff)
parent3727cad0c4bbcac31030cf67a5836729e08a56d8 (diff)
downloadtangerine-wallet-browser-4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f.tar
tangerine-wallet-browser-4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f.tar.gz
tangerine-wallet-browser-4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f.tar.bz2
tangerine-wallet-browser-4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f.tar.lz
tangerine-wallet-browser-4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f.tar.xz
tangerine-wallet-browser-4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f.tar.zst
tangerine-wallet-browser-4c1b7700adb6ac1906ef79bfd19c1402bc8ade4f.zip
Merge branch 'dev' into TearDownOnDisconnect
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r--app/scripts/keyring-controller.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 92429f7f5..c58be0aae 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -316,20 +316,16 @@ 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, cb) {
- try {
- const address = normalize(selectedAddress)
- return this.getKeyringForAccount(address)
- .then((keyring) => {
- return keyring.signTransaction(address, ethTx)
- }).then((tx) => {
- this.emit(`${txId}:signed`, {tx, txId, cb})
- })
- } catch (e) {
- cb(e)
- }
- }
+ signTransaction (ethTx, selectedAddress, txId) {
+ const address = normalize(selectedAddress)
+ return this.getKeyringForAccount(address)
+ .then((keyring) => {
+ return keyring.signTransaction(address, ethTx)
+ }).then((tx) => {
+ return {tx, txId}
+ })
+ }
// Add Unconfirmed Message
// @object msgParams
// @function cb