diff options
background - use provider-engine zero client
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 8572d53a3..17238f227 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -3,7 +3,7 @@ const eos = require('end-of-stream') const extend = require('xtend') const EthStore = require('eth-store') const PortStream = require('./lib/port-stream.js') -const MetaMaskProvider = require('./lib/metamask-provider') +const MetaMaskProvider = require('web3-provider-engine/zero.js') const IdentityStore = require('./lib/idStore') console.log('ready to roll') @@ -40,9 +40,15 @@ var zeroClient = MetaMaskProvider({ var result = selectedAddress ? [selectedAddress] : [] cb(null, result) }, - approveTx: idStore.addUnconfirmedTransaction.bind(idStore), + approveTransaction: idStore.addUnconfirmedTransaction.bind(idStore), signTransaction: idStore.signTransaction.bind(idStore), }) + +// log new blocks +zeroClient.on('block', function(block){ + console.log('BLOCK CHANGED:', '#'+block.number.toString('hex'), '0x'+block.hash.toString('hex')) +}) + var ethStore = new EthStore(zeroClient) idStore.setStore(ethStore) |