From dfab722ec87ba08bb84ce7ab234053558ac6eb0e Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 23 Apr 2024 16:04:21 +0200 Subject: [PATCH] fix adding custom network --- apps/remix-ide/src/app/providers/injected-custom-provider.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/injected-custom-provider.tsx b/apps/remix-ide/src/app/providers/injected-custom-provider.tsx index de00283e8f..c050496698 100644 --- a/apps/remix-ide/src/app/providers/injected-custom-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-custom-provider.tsx @@ -24,7 +24,9 @@ export class InjectedCustomProvider extends InjectedProviderDefault { } await super.init() if (this.chainName && this.rpcUrls && this.rpcUrls.length > 0) await addCustomNetwork(this.chainName, this.chainId, this.rpcUrls, this.nativeCurrency, this.blockExplorerUrls) - else throw new Error('Cannot add the custom network to main injected provider') + else { + console.log('The custom network is added without rpcUrls, the network need to be already installed in the injected provider.') + } return {} } }