From 5acf516c1f88d5816af262e4027f41319706c253 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Tue, 17 Oct 2023 17:29:55 +0200 Subject: [PATCH] fix connection to staderlabs --- extension/src/bridge/iframe.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/extension/src/bridge/iframe.ts b/extension/src/bridge/iframe.ts index 8c8f7d7c..ecc9aeeb 100644 --- a/extension/src/bridge/iframe.ts +++ b/extension/src/bridge/iframe.ts @@ -111,8 +111,12 @@ export default class BridgeIframe extends EventEmitter { } // Some apps don't support generic injected providers, so we pretend to be MetaMask - isMetaMask = - window.location.hostname === 'app.stakewise.io' || - window.location.hostname === 'app.aura.finance' || - window.location.hostname === 'www.ankr.com' + isMetaMask = HOSTNAMES_REQUIRING_METAMASK.includes(window.location.hostname) } + +const HOSTNAMES_REQUIRING_METAMASK = [ + 'app.stakewise.io', + 'app.aura.finance', + 'www.ankr.com', + 'www.staderlabs.com', +]