f-o-a-m / purescript-web3

a purescript library for the web3 api
Apache License 2.0
127 stars 24 forks source link

fix _sendAsync canceler #102

Closed safareli closed 6 years ago

safareli commented 6 years ago

HttpProvider.prototype.sendAsync returns undefined so we can't cancel it. https://github.com/ethereum/web3.js/blob/develop/lib/web3/httpprovider.js#L114-L141

safareli commented 6 years ago

let's wait for answer on https://github.com/slamdata/purescript-aff/issues/148 before we merge

safareli commented 6 years ago

We can merge this so killFiber is not blowing up, and then once https://github.com/ethereum/web3.js/pull/1618 is merged we can implement proper canceler which aborts running ajax request

safareli commented 6 years ago

Note it would be harder for metamask to support cancellation see https://github.com/MetaMask/metamask-extension/issues/4225, so we should have in mind that sendAsync might return undefined.