web3data-js
web3data-js copied to clipboard
Calling .on before connect does not error elegantly
Bug:
Calling .on before connect does not error elegantly (and perhaps it should not error).It might be necessary that it saves the subscription then connects after the .connect() method is called.
Steps to replicate:
const w3d = new Web3Data(API_KEY)
w3d.on({eventName: 'block'}, () => {
})
w3d.connect()
This will throw an x is undef error.