Skip to content

Commit

Permalink
fix: add okx wallet (#3859)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidmorizon authored Nov 23, 2023
1 parent 10f7351 commit 2abd50b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Binary file added packages/kit/assets/onboarding/logo_okx_wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import platformEnv from '@onekeyhq/shared/src/platformEnv';

import LogoWalletConnect from '../../../assets/onboarding/logo_walletconnect.png';
import { wait } from '../../utils/helper';
import { openUrlExternal } from '../../utils/openUrl';
import { useConnectExternalWallet } from '../../views/ExternalAccount/useConnectExternalWallet';

import { useMobileRegistryOfWalletServices } from './useMobileRegistryOfWalletServices';
Expand Down Expand Up @@ -239,9 +240,14 @@ export function ConnectWalletListView({
logo={imgUri}
logoSource={logoSource}
isLoading={loadingId === item.id}
onPress={() =>
doConnect({ walletService: item, itemLoadingId: item.id })
}
onPress={() => {
if (item.name === 'OKX Wallet') {
// OKX Wallet not support walletconnect v1
openUrlExternal('https://www.okx.com/web3');
} else {
doConnect({ walletService: item, itemLoadingId: item.id });
}
}}
/>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function buildEnabledWallets({
WALLET_CONNECT_WALLET_NAMES['Trust Wallet'],
WALLET_CONNECT_WALLET_NAMES.Rainbow,
WALLET_CONNECT_WALLET_NAMES.imToken,
WALLET_CONNECT_WALLET_NAMES['OKX Wallet'],
WALLET_CONNECT_WALLET_NAMES.TokenPocket,
WALLET_CONNECT_WALLET_NAMES.BitKeep,
WALLET_CONNECT_WALLET_NAMES.Zerion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const WALLET_CONNECT_CLIENT_META = {

export const WALLET_CONNECT_WALLET_NAMES = {
'MetaMask': 'MetaMask',
'OKX Wallet': 'OKX Wallet',
'Trust Wallet': 'Trust Wallet',
'Rainbow': 'Rainbow',
'imToken': 'imToken',
Expand Down

0 comments on commit 2abd50b

Please sign in to comment.