From f8efacd9d6640c0244a9c52d71f5aeb09d297d23 Mon Sep 17 00:00:00 2001 From: Den Smalonski Date: Mon, 25 Nov 2024 09:46:01 +0100 Subject: [PATCH] fix: remove PK module for production --- src/hooks/wallets/wallets.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/wallets/wallets.ts b/src/hooks/wallets/wallets.ts index e7098be87..f3ac90d7e 100644 --- a/src/hooks/wallets/wallets.ts +++ b/src/hooks/wallets/wallets.ts @@ -1,4 +1,4 @@ -import { TREZOR_APP_URL, TREZOR_EMAIL, WC_PROJECT_ID } from '@/config/constants' +import { TREZOR_APP_URL, TREZOR_EMAIL, WC_PROJECT_ID, IS_PRODUCTION } from '@/config/constants' import type { ChainInfo } from '@safe-global/safe-gateway-typescript-sdk' import type { InitOptions } from '@web3-onboard/core' import coinbaseModule from '@web3-onboard/coinbase' @@ -45,7 +45,7 @@ const WALLET_MODULES: Partial<{ [key in WALLET_KEYS]: (chain: ChainInfo) => Wall [WALLET_KEYS.LEDGER]: () => ledgerModule() as WalletInit, [WALLET_KEYS.TREZOR]: () => trezorModule({ appUrl: TREZOR_APP_URL, email: TREZOR_EMAIL }) as WalletInit, [WALLET_KEYS.KEYSTONE]: () => keystoneModule() as WalletInit, - [WALLET_KEYS.PK]: (chain) => pkModule(chain.chainId, chain.rpcUri) as WalletInit, + ...(!IS_PRODUCTION ? { [WALLET_KEYS.PK]: (chain) => pkModule(chain.chainId, chain.rpcUri) as WalletInit } : {}), } export const getAllWallets = (chain: ChainInfo): WalletInits => {