ethers-web3-bridge icon indicating copy to clipboard operation
ethers-web3-bridge copied to clipboard

Instantiating ProviderBridge sets an interval that hangs your node process

Open alcuadrado opened this issue 7 years ago • 3 comments

ProvideBridge's constructor sets up an interval here that is impossible to stop and doesn't let node processes finish.

Running this script in node is enough to reproduce the problem:

const ProviderBridge = require('ethers-web3-bridge');
new ProviderBridge();

The expected behavior is that the process finishes right after instantiating ProviderBridge, but it never does.

This could be fixed by adding some method to clear that interval, but IMO that would cripple ProviderBridge's API, as it won't be usable in a fire-and-forget scenario.

But I don't see a clear need for having that interval, can't the address be updated right after setting the signer here.

There's also this functionality, which may return an outdated address if the proposed change is implemented, but that's already happening.

alcuadrado avatar May 29 '18 14:05 alcuadrado

@alcuadrado I think this repo is probably not in maintenance now. Many mistakes there (It's not up to date with the latest ethers )

ghost avatar Jun 11 '18 02:06 ghost

Sorry, just saw this issue.

I will update this package this week, i think updatin the major version of ethers will be sufficient.

A new major version of ethers is on the horizon as well. I’ll make an issue on that repo to update this package again once that is ready.

ricmoo avatar Jun 11 '18 03:06 ricmoo

thanks for your job. @ricmoo I completed the requirement using methods that comes with ethers. It's easier than fighting with bridge :)

ghost avatar Jun 13 '18 10:06 ghost