ethjs / ethjs-rpc

A super simple module for making low level queries to the Ethereum RPC layer.
MIT License
14 stars 11 forks source link

Naive implementation promise->callback can trigger double callback #5

Closed kumavis closed 6 years ago

kumavis commented 6 years ago

https://github.com/ethjs/ethjs-rpc/blob/a7a7804c70551827de5ed15d42f9550c4aadba1f/src/index.js#L62-L66

if an error is thrown in the then's callback, the catch's callback will be called this breaks callback semantics

kumavis commented 6 years ago

consider https://www.npmjs.com/package/promise-to-callback