aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-01-17 01:59:32 +0800
committerGitHub <noreply@github.com>2018-01-17 01:59:32 +0800
commit6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc (patch)
tree663d0a2fb409cff6cf8ab5f9619f5687bb51020e /app/scripts
parent845917b2d5d393cbe9f348afce87a04f1b0fd0fb (diff)
parent27ca48b369c1bf66298bb878477353a7ec3f9130 (diff)
downloadtangerine-wallet-browser-6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc.tar
tangerine-wallet-browser-6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc.tar.gz
tangerine-wallet-browser-6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc.tar.bz2
tangerine-wallet-browser-6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc.tar.lz
tangerine-wallet-browser-6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc.tar.xz
tangerine-wallet-browser-6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc.tar.zst
tangerine-wallet-browser-6cfaf03b3d44bf2be5c4e3c2c84ca2181b2aefcc.zip
Merge branch 'master' into i2907-NoCodeGasLimit
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/controllers/transactions.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index ded9739a8..bb9253175 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -139,7 +139,6 @@ module.exports = class TransactionController extends EventEmitter {
async newUnapprovedTransaction (txParams) {
log.debug(`MetaMaskController newUnapprovedTransaction ${JSON.stringify(txParams)}`)
const initialTxMeta = await this.addUnapprovedTransaction(txParams)
- this.emit('newUnapprovedTx', initialTxMeta)
// listen for tx completion (success, fail)
return new Promise((resolve, reject) => {
this.txStateManager.once(`${initialTxMeta.id}:finished`, (finishedTxMeta) => {
@@ -167,11 +166,16 @@ module.exports = class TransactionController extends EventEmitter {
status: 'unapproved',
metamaskNetworkId: this.getNetwork(),
txParams: txParams,
+ loadingDefaults: true,
}
+ this.addTx(txMeta)
+ this.emit('newUnapprovedTx', txMeta)
// add default tx params
await this.addTxDefaults(txMeta)
+
+ txMeta.loadingDefaults = false
// save txMeta
- this.addTx(txMeta)
+ this.txStateManager.updateTx(txMeta)
return txMeta
}