aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/transactions/tx-state-manager.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/controllers/transactions/tx-state-manager.js')
-rw-r--r--app/scripts/controllers/transactions/tx-state-manager.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/controllers/transactions/tx-state-manager.js b/app/scripts/controllers/transactions/tx-state-manager.js
index 72d869fa8..420191d9c 100644
--- a/app/scripts/controllers/transactions/tx-state-manager.js
+++ b/app/scripts/controllers/transactions/tx-state-manager.js
@@ -45,11 +45,13 @@ class TransactionStateManager extends EventEmitter {
@returns {txMeta} the default txMeta object
*/
generateTxMeta (opts) {
+ const netId = this.getNetwork()
+ if (netId === 'loading') throw new Error('MetaMask is having trouble connecting to the network')
return extend({
id: createId(),
time: (new Date()).getTime(),
status: 'unapproved',
- metamaskNetworkId: this.getNetwork(),
+ metamaskNetworkId: netId,
loadingDefaults: true,
}, opts)
}