On the TokensList page, we subscribe e.g. to balanceOf$(myAddress). This creates a WS subscription to eth_blockNumber (light client listens to new head, updates balance on new block).
Now when we switch to the Send Ether page, this is what happens:
TokensList calls componentWillUnmount, so unsubscribes from the Observable balanceOf$(myAddress)
balanceOf$(myAddress) will have a subscription count of 0, so the underlying WS subscription is closed (that's a feature of light.js)
TxForm calls componentWillMount, and will subscribe again to balanceOf$(myAddress), which will create a new WS subscription to eth_blockNumber
I'm still not sure where to solve this: on the light.js level or on the Fether level.
On the TokensList page, we subscribe e.g. to
balanceOf$(myAddress)
. This creates a WS subscription toeth_blockNumber
(light client listens to new head, updates balance on new block).Now when we switch to the Send Ether page, this is what happens:
componentWillUnmount
, so unsubscribes from the ObservablebalanceOf$(myAddress)
balanceOf$(myAddress)
will have a subscription count of 0, so the underlying WS subscription is closed (that's a feature of light.js)TxForm
callscomponentWillMount
, and will subscribe again tobalanceOf$(myAddress)
, which will create a new WS subscription toeth_blockNumber
I'm still not sure where to solve this: on the light.js level or on the Fether level.