Skip to content

Commit

Permalink
add detecting bitget through window object
Browse files Browse the repository at this point in the history
  • Loading branch information
msadura committed Dec 26, 2024
1 parent 349a921 commit da8675f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/swapkit/helpers/src/helpers/web3wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ declare const window: {
trustwallet: EthereumWindowProvider;
coinbaseWalletExtension: EthereumWindowProvider;
braveSolana: any;
bitkeep?: { ethereum: EthereumWindowProvider };
} & Window;

type NetworkParams = {
Expand Down Expand Up @@ -157,6 +158,7 @@ export const listWeb3EVMWallets = () => {
(window?.ethereum?.overrideIsMetaMask &&
window?.ethereum?.selectedProvider?.isCoinbaseWallet) ||
window?.coinbaseWalletExtension;
const bitgetEnabled = window?.bitkeep?.ethereum;

const wallets = [];
if (metamaskEnabled) wallets.push(WalletOption.METAMASK);
Expand All @@ -165,6 +167,7 @@ export const listWeb3EVMWallets = () => {
if (trustEnabled) wallets.push(WalletOption.TRUSTWALLET_WEB);
if (coinbaseEnabled) wallets.push(WalletOption.COINBASE_WEB);
if (okxMobileEnabled()) wallets.push(WalletOption.OKX_MOBILE);
if (bitgetEnabled) wallets.push(WalletOption.BITGET);

return wallets;
};
Expand Down

0 comments on commit da8675f

Please sign in to comment.