Skip to content

Commit

Permalink
Refactor WalletConnectModal component to use useWeb3Modal hook
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-vahn committed Apr 26, 2024
1 parent 1a46504 commit adb55d8
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/components/connectors/WalletConnectModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
// import axios from 'axios';
// import WebApp from '@twa-dev/sdk';
import { useWeb3Modal } from '@web3modal/ethers/react';

import ConnectButton from '../buttons/ConnectButton';

Expand All @@ -11,20 +10,10 @@ type Props = {
};

const WalletConnectModal: React.FC<Props> = ({ title, icon }) => {
// const [uri, setUri] = React.useState<string | null>(null);
const { open } = useWeb3Modal();

const connect = async () => {
// Post request to localhost:3000/connect with axios
// axios
// .post(
// 'https://8d58-2a02-8106-21-bc00-20a7-e089-bdb8-452a.ngrok-free.app/connect'
// )
// .then((response) => {
// // Set uri with response data
// console.log(response.data);
// setUri(response.data.universalLink);
// WebApp.openLink(response.data.universalLink);
// });
open();
};

return (
Expand Down

0 comments on commit adb55d8

Please sign in to comment.