Skip to content

Commit

Permalink
refactor(tangle-dapp): Disable Wallet Connect wallet (#2230)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurixander authored Apr 14, 2024
1 parent 3814ce8 commit e7ac878
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
useWebContext,
} from '@webb-tools/api-provider-environment';
import getPlatformMetaData from '@webb-tools/browser-utils/platform/getPlatformMetaData';
import { PresetTypedChainId } from '@webb-tools/dapp-types';
import { PresetTypedChainId, WalletId } from '@webb-tools/dapp-types';
import {
calculateTypedChainId,
ChainType,
Expand Down Expand Up @@ -33,16 +33,23 @@ export const WalletModalContainer = () => {
} = useConnectWallet({ useAllWallets: true });

const { network } = useNetworkStore();

const { notificationApi } = useWebbUI();

const { apiConfig } = useWebContext();

const targetTypedChainIds = useMemo(
() => networkToTypedChainIds(network),
[network]
);

// TODO: Fix the issue with WalletConnectV2 and re-enable it.
const wallets = useMemo(() => {
// Exclude WalletConnectV2 from the list of supported wallets, as it
// is currently broken in the dApp.
return supportedWallets.filter(
(wallet) => wallet.id !== WalletId.WalletConnectV2
);
}, [supportedWallets]);

return (
<WalletModal
connectingWalletId={connectingWalletId}
Expand All @@ -54,7 +61,7 @@ export const WalletModalContainer = () => {
connectWallet={connectWallet}
toggleModal={toggleModal}
connectError={connectError}
supportedWallets={supportedWallets}
supportedWallets={wallets}
notificationApi={notificationApi}
apiConfig={apiConfig}
targetTypedChainIds={targetTypedChainIds}
Expand Down

0 comments on commit e7ac878

Please sign in to comment.