diff --git a/src/hooks/wallets/consts.ts b/src/hooks/wallets/consts.ts index 8150309c..ba0f90e0 100644 --- a/src/hooks/wallets/consts.ts +++ b/src/hooks/wallets/consts.ts @@ -8,6 +8,7 @@ export const enum WALLET_KEYS { WALLETCONNECT = 'WALLETCONNECT', WALLETCONNECT_V2 = 'WALLETCONNECT_V2', TAHO = 'TAHO', + OKX = 'OKX', } export const CGW_NAMES: { [key in WALLET_KEYS]: string | undefined } = { @@ -20,4 +21,5 @@ export const CGW_NAMES: { [key in WALLET_KEYS]: string | undefined } = { [WALLET_KEYS.WALLETCONNECT]: 'walletConnect', [WALLET_KEYS.WALLETCONNECT_V2]: 'walletConnect_v2', [WALLET_KEYS.TAHO]: 'tally', + [WALLET_KEYS.OKX]: 'okx', } diff --git a/src/hooks/wallets/wallets.ts b/src/hooks/wallets/wallets.ts index 82608786..9f330f59 100644 --- a/src/hooks/wallets/wallets.ts +++ b/src/hooks/wallets/wallets.ts @@ -14,6 +14,8 @@ import pairingModule from '@/services/pairing/module' import e2eWalletModule from '@/tests/e2e-wallet' import { CGW_NAMES, WALLET_KEYS } from './consts' +import okxWallet from '@web3-onboard/okx' + const prefersDarkMode = (): boolean => { return window?.matchMedia('(prefers-color-scheme: dark)')?.matches } @@ -56,6 +58,7 @@ const WALLET_MODULES: { [key in WALLET_KEYS]: (chain: ChainInfo) => WalletInit } [WALLET_KEYS.KEYSTONE]: () => keystoneModule(), [WALLET_KEYS.TAHO]: () => tahoModule(), [WALLET_KEYS.COINBASE]: () => coinbaseModule({ darkMode: prefersDarkMode() }), + [WALLET_KEYS.OKX]: () => okxWallet(), } export const getAllWallets = (chain: ChainInfo): WalletInit[] => { diff --git a/yarn.lock b/yarn.lock index 6b25b854..5b504617 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14840,4 +14840,4 @@ yn@3.1.1: yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== \ No newline at end of file