diff options
web3-provider - add nonce tracker
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/metamask-provider.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/scripts/lib/metamask-provider.js b/app/scripts/lib/metamask-provider.js index 45da06dcd..589ea0fad 100644 --- a/app/scripts/lib/metamask-provider.js +++ b/app/scripts/lib/metamask-provider.js @@ -1,4 +1,5 @@ const ProviderEngine = require('web3-provider-engine') +const NonceTrackerSubprovider = require('web3-provider-engine/subproviders/nonce-tracker.js') const CacheSubprovider = require('web3-provider-engine/subproviders/cache.js') const FixtureSubprovider = require('web3-provider-engine/subproviders/fixture.js') const FilterSubprovider = require('web3-provider-engine/subproviders/filters.js') @@ -12,6 +13,9 @@ function metamaskProvider(opts){ var engine = new ProviderEngine() + // nonce tracker + engine.addProvider(new NonceTrackerSubprovider()) + // cache layer engine.addProvider(new CacheSubprovider()) @@ -33,6 +37,7 @@ function metamaskProvider(opts){ // id mgmt engine.addProvider(new HookedWalletSubprovider({ getAccounts: opts.getAccounts, + approveTx: opts.approveTx, signTransaction: opts.signTransaction, })) |