aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/transactions.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-07-27 01:40:08 +0800
committerkumavis <aaron@kumavis.me>2017-07-27 01:40:08 +0800
commit0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5 (patch)
treefaee83d259fa3e3dfd8c8dfe52a9cc218f58b93f /app/scripts/controllers/transactions.js
parent39d28922de31fa26b50eca5c7719ae9feefae770 (diff)
downloadtangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.gz
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.bz2
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.lz
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.xz
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.zst
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.zip
tx controller + nonce tracker - record nonce components on txMeta
Diffstat (limited to 'app/scripts/controllers/transactions.js')
-rw-r--r--app/scripts/controllers/transactions.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 7b2e4e314..32795a9f2 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -200,8 +200,12 @@ module.exports = class TransactionController extends EventEmitter {
// get next nonce
const txMeta = this.getTx(txId)
const fromAddress = txMeta.txParams.from
+ // wait for a nonce
nonceLock = await this.nonceTracker.getNonceLock(fromAddress)
+ // add nonce to txParams
txMeta.txParams.nonce = nonceLock.nextNonce
+ // add nonce debugging information to txMeta
+ txMeta.nonceDetails = nonceLock.nonceDetails
this.updateTx(txMeta)
// sign transaction
const rawTx = await this.signTransaction(txId)