Instantiating ProviderBridge sets an interval that hangs your node process
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 I think this repo is probably not in maintenance now. Many mistakes there (It's not up to date with the latest ethers )
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.
thanks for your job. @ricmoo I completed the requirement using methods that comes with ethers. It's easier than fighting with bridge :)