diff options
author | Dan <danjm.com@gmail.com> | 2018-06-07 03:10:43 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-06-07 03:10:43 +0800 |
commit | ae55e8a3c122a3f6d91e28153124bfb6a13ded84 (patch) | |
tree | b23043409b2877bce4096d411f3c3273a610b146 /app/scripts/controllers/transactions/index.js | |
parent | aee9247faab984734d2f0278baaf768e2a7926d2 (diff) | |
parent | 1fb408f62eb081311937420bb42da6c835510590 (diff) | |
download | tangerine-wallet-browser-ae55e8a3c122a3f6d91e28153124bfb6a13ded84.tar.gz tangerine-wallet-browser-ae55e8a3c122a3f6d91e28153124bfb6a13ded84.tar.zst tangerine-wallet-browser-ae55e8a3c122a3f6d91e28153124bfb6a13ded84.zip |
Merge branch 'develop' into i3725-refactor-send-component-
Diffstat (limited to 'app/scripts/controllers/transactions/index.js')
-rw-r--r-- | app/scripts/controllers/transactions/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index aff5db984..b53947e27 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -10,6 +10,7 @@ const NonceTracker = require('./nonce-tracker') const txUtils = require('./lib/util') const cleanErrorStack = require('../../lib/cleanErrorStack') const log = require('loglevel') +const recipientBlacklistChecker = require('./lib/recipient-blacklist-checker') /** Transaction Controller is an aggregate of sub-controllers and trackers @@ -157,8 +158,11 @@ class TransactionController extends EventEmitter { let txMeta = this.txStateManager.generateTxMeta({ txParams: normalizedTxParams }) this.addTx(txMeta) this.emit('newUnapprovedTx', txMeta) - // add default tx params + try { + // check whether recipient account is blacklisted + recipientBlacklistChecker.checkAccount(txMeta.metamaskNetworkId, normalizedTxParams.to) + // add default tx params txMeta = await this.addTxGasDefaults(txMeta) } catch (error) { console.log(error) |