From 99a5613a9cf29ecfa229b26cb2c35af64f0e3d09 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 29 Mar 2023 14:56:08 +0200 Subject: [PATCH] add "injected" even if no provider --- apps/remix-ide/src/app/udapp/run-tab.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/remix-ide/src/app/udapp/run-tab.js b/apps/remix-ide/src/app/udapp/run-tab.js index 8bec995ca8..7ecca1596b 100644 --- a/apps/remix-ide/src/app/udapp/run-tab.js +++ b/apps/remix-ide/src/app/udapp/run-tab.js @@ -139,6 +139,9 @@ export class RunTab extends ViewPlugin { window.ethereum.isBraveWallet || window.ethereum.selectedProvider?.isBraveWallet ? ' - Brave' : window.ethereum.isMetaMask || window.ethereum.selectedProvider?.isMetaMask ? ' - MetaMask' : '' : ''}` await addProvider('injected', displayNameInjected, true, false) + } else if (window && !window.ethereum) { + // we still add "injected" if there's no provider (just so it's visible to the user). + await addProvider('injected', 'Injected Provider', true, false) } if (window && window.trustwallet) {