aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-10-11 01:50:45 +0800
committerkumavis <aaron@kumavis.me>2017-10-11 01:50:45 +0800
commitff4e9a0d1122db83221bc956f11c9520bf0e008c (patch)
treeb2883c6b643718c421f03910b9029cca8e05f0db /app/scripts/metamask-controller.js
parentf7c1bc804d12cfae4ff99b958b793a6fb68f4aa0 (diff)
downloadtangerine-wallet-browser-ff4e9a0d1122db83221bc956f11c9520bf0e008c.tar
tangerine-wallet-browser-ff4e9a0d1122db83221bc956f11c9520bf0e008c.tar.gz
tangerine-wallet-browser-ff4e9a0d1122db83221bc956f11c9520bf0e008c.tar.bz2
tangerine-wallet-browser-ff4e9a0d1122db83221bc956f11c9520bf0e008c.tar.lz
tangerine-wallet-browser-ff4e9a0d1122db83221bc956f11c9520bf0e008c.tar.xz
tangerine-wallet-browser-ff4e9a0d1122db83221bc956f11c9520bf0e008c.tar.zst
tangerine-wallet-browser-ff4e9a0d1122db83221bc956f11c9520bf0e008c.zip
metamask controller - define this.newTransaction to ease instantiation order
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index df5784571..1292d2a1e 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -90,7 +90,7 @@ module.exports = class MetamaskController extends EventEmitter {
// account mgmt
getAccounts: nodeify(this.getAccounts, this),
// tx signing
- processTransaction: nodeify(this.txController.newUnapprovedTransaction, this.txController),
+ processTransaction: nodeify(this.newTransaction, this),
// old style msg signing
processMessage: this.newUnsignedMessage.bind(this),
// personal_sign msg signing
@@ -525,6 +525,11 @@ module.exports = class MetamaskController extends EventEmitter {
// Identity Management
//
+ // this function wrappper lets us pass the fn reference before txController is instantiated
+ async newTransaction (txParams) {
+ return await this.txController.newUnapprovedTransaction(txParams)
+ }
+
newUnsignedMessage (msgParams, cb) {
const msgId = this.messageManager.addUnapprovedMessage(msgParams)
this.sendUpdate()