This repository was archived by the owner on May 24, 2022. It is now read-only.

Description
import light from '@parity/light.js';
light.setProvider(web3.currentProvider);
// this works as expected and outputs the correct big number
balanceOf$('0x407d73d8a49eeb85d32cf465507dd71d507100c1').subscribe(balance =>
console.log('balance', balance)
);
// this seems to be initialized properly, but the callback is never fired
blockNumber$().subscribe(blockNumber =>
console.log('blockNumber', blockNumber)
);
defaultAccount$() also is working as expected for me, firing cb each time i change account in MetaMask.
I've tried this with both web3@latest (MetaMask), default web3 (.0.2.x?) injected by MetaMask, and infura websocket. all had same behavior (also tried the makeContract and reading state but those cb were never fired either, although it looks like the contract was set up correctly)
I've also tried wrapping currentProvider in API.provider.Current, same behavior
this looks very useful so would love to see how i can improve our DApp with light.js https://blockimmo.ch