Closed ghost closed 3 years ago
Why is setting the chain id and network name required in the first place? If it does not work without that, it indicates that the connext endpoint is missing some information. Ethers should fetch that data on its own automatically
It seems to be a required type for Network
:
export declare type Network = {
name: string;
chainId: number;
ensAddress?: string;
_defaultProvider?: (providers: any, options?: any) => any;
};
It seems to be a required type for Network:
Yeah but why do you set the network in the first place? In my experience, ethers fetches the values it needs automatically.
It seems to be a required type for Network:
Yeah but why do you set the network in the first place? In my experience, ethers fetches the values it needs automatically.
You're right. Removed it and it still works. Thanks.
This PR ensures that we pass in
rinkeby
as the network name when running in testnet mode. Otherwiseethers.providers.JsonRpcProvider
would fail to initialize.Can be tested using https://github.com/ExchangeUnion/xud-docker/pull/819