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/controllers/transactions.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/controllers/transactions.js')
-rw-r--r-- | app/scripts/controllers/transactions.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 7e2cc15da..458bf912b 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -161,9 +161,11 @@ module.exports = class TransactionController extends EventEmitter { this.emit(`${txMeta.id}:unapproved`, txMeta) } - async newUnapprovedTransaction (txParams) { + async newUnapprovedTransaction (txParams, opts = {origin: 'metamask'}) { log.debug(`MetaMaskController newUnapprovedTransaction ${JSON.stringify(txParams)}`) const initialTxMeta = await this.addUnapprovedTransaction(txParams) + initialTxMeta.origin = opts.origin + this.txStateManager.updateTx(initialTxMeta, '#newUnapprovedTransaction - adding the origin') // listen for tx completion (success, fail) return new Promise((resolve, reject) => { this.txStateManager.once(`${initialTxMeta.id}:finished`, (finishedTxMeta) => { |