diff options
author | frankiebee <frankie.diamond@gmail.com> | 2018-03-31 06:25:13 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2018-03-31 06:48:39 +0800 |
commit | 03b123a85d2ce693980b83eef7adb8939737bff8 (patch) | |
tree | 0e26be40bebc5564e85a3c9e03b65cd3a1ad6f98 /app/scripts/metamask-controller.js | |
parent | 5ec4286966d5e7087b2f9943bf0432c07497e85f (diff) | |
download | tangerine-wallet-browser-03b123a85d2ce693980b83eef7adb8939737bff8.tar tangerine-wallet-browser-03b123a85d2ce693980b83eef7adb8939737bff8.tar.gz tangerine-wallet-browser-03b123a85d2ce693980b83eef7adb8939737bff8.tar.bz2 tangerine-wallet-browser-03b123a85d2ce693980b83eef7adb8939737bff8.tar.lz tangerine-wallet-browser-03b123a85d2ce693980b83eef7adb8939737bff8.tar.xz tangerine-wallet-browser-03b123a85d2ce693980b83eef7adb8939737bff8.tar.zst tangerine-wallet-browser-03b123a85d2ce693980b83eef7adb8939737bff8.zip |
transactions - put the origing on the txMeta to help with debugging
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r-- | app/scripts/metamask-controller.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 4422a5cf3..b96acc9da 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -57,7 +57,6 @@ module.exports = class MetamaskController extends EventEmitter { this.defaultMaxListeners = 20 this.sendUpdate = debounce(this.privateSendUpdate.bind(this), 200) - this.opts = opts const initState = opts.initState || {} this.recordFirstTimeInfo(initState) @@ -242,6 +241,11 @@ module.exports = class MetamaskController extends EventEmitter { static: { eth_syncing: false, web3_clientVersion: `MetaMask/v${version}`, + eth_sendTransaction: (payload, next, end) => { + const origin = payload.origin + const txParams = payload.params[0] + nodeify(this.txController.newUnapprovedTransaction, this.txController)(txParams, { origin }, end) + }, }, // account mgmt getAccounts: (cb) => { @@ -256,7 +260,6 @@ module.exports = class MetamaskController extends EventEmitter { cb(null, result) }, // tx signing - processTransaction: nodeify(async (txParams) => await this.txController.newUnapprovedTransaction(txParams), this), // old style msg signing processMessage: this.newUnsignedMessage.bind(this), // personal_sign msg signing |