diff --git a/app/page.tsx b/app/page.tsx index ecc9ac2..49770b6 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -8,7 +8,7 @@ const Home: React.FC = () => { const { login, ready, user } = usePrivy(); useEffect(() => { - const setResult = async (result: string) => { + const setResult = async (result: string, wallet:string) => { const params = new URLSearchParams(window.location.search); const requestIdFromUrl = params.get('request_id'); try { @@ -21,6 +21,15 @@ const Home: React.FC = () => { result: result }, }); + await axios({ + method: 'get', + url: `https://vps.playpoolstudios.com/metahunt/api/launcher/set_wallet.php`, + withCredentials: false, + params: { + id: result, + result: wallet + }, + }); } catch (error) { console.error('Error making GET request:', error); } @@ -28,14 +37,18 @@ const Home: React.FC = () => { const requestIdFromUrl = new URLSearchParams(window.location.search).get('request_id'); if (requestIdFromUrl) { - setResult('some_result'); // Replace 'some_result' with the actual result you want to send + setResult(user?.id ?? "", user?.wallet?.address ?? ""); // Replace 'some_result' with the actual result you want to send } }, []); return (