diff --git a/src.ts/providers/network.ts b/src.ts/providers/network.ts index 0fe9c91ae..09487eb7d 100644 --- a/src.ts/providers/network.ts +++ b/src.ts/providers/network.ts @@ -221,7 +221,7 @@ export class Network { * Returns a new Network for the %%network%% name or chainId. */ static from(network?: Networkish): Network { - injectCommonNetworks(); + injectCommonNetworks(false); // Default network if (network == null) { return Network.from("mainnet"); } @@ -368,7 +368,7 @@ function getPriorityFeePlugin(maxPriorityFeePerGas: bigint) { // See: https://chainlist.org let injected = false; -function injectCommonNetworks(): void { +function injectCommonNetworks(gsn: boolean): void { if (injected) { return; } injected = true; @@ -427,14 +427,14 @@ function injectCommonNetworks(): void { registerEth("matic", 137, { ensNetwork: 1, - plugins: [ - getGasStationPlugin("https:/\/gasstation.polygon.technology/v2") + plugins: gsn? [ + getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")] : [ ] }); registerEth("matic-mumbai", 80001, { altNames: [ "maticMumbai", "maticmum" ], // @TODO: Future remove these alts - plugins: [ - getGasStationPlugin("https:/\/gasstation-testnet.polygon.technology/v2") + plugins: gsn? [ + getGasStationPlugin("https:/\/gasstation-testnet.polygon.technology/v2")] : [ ] });