From d7ee2e570527ae37621096ddd30cd4c61a091eab Mon Sep 17 00:00:00 2001 From: bal7hazar Date: Thu, 19 Dec 2024 20:32:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20debuggers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/profile/src/hooks/starknetid.ts | 7 +------ packages/profile/src/hooks/wallet.ts | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/profile/src/hooks/starknetid.ts b/packages/profile/src/hooks/starknetid.ts index 77f506b51..2037ddd25 100644 --- a/packages/profile/src/hooks/starknetid.ts +++ b/packages/profile/src/hooks/starknetid.ts @@ -1,6 +1,5 @@ import { useQuery } from "react-query"; import { useConnection } from "./context"; -import { Provider } from "starknet"; import { useState } from "react"; export const useStarkAddress = ({ name }: { name: string }) => { @@ -11,12 +10,8 @@ export const useStarkAddress = ({ name }: { name: string }) => { enabled: !!name && name.includes(".stark"), queryKey: ["starknetid", name], queryFn: async () => { - console.log(provider); setError(""); - const custom = new Provider({ - nodeUrl: "https://api.cartridge.gg/x/starknet/mainnet", - }); - const address = await custom.getAddressFromStarkName(name); + const address = await provider.getAddressFromStarkName(name); if (!address || address === "0x0") { setError("Could not get address from stark name"); return null; diff --git a/packages/profile/src/hooks/wallet.ts b/packages/profile/src/hooks/wallet.ts index b05aad173..475862088 100644 --- a/packages/profile/src/hooks/wallet.ts +++ b/packages/profile/src/hooks/wallet.ts @@ -1,7 +1,6 @@ import { useQuery } from "react-query"; import { useConnection } from "./context"; import { useMemo, useState } from "react"; -import { Provider } from "starknet"; const ARGENT_ACCOUNT_CLASS_HASHES: BigInt[] = [ BigInt("0x036078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f"), @@ -35,11 +34,7 @@ export function useWallet({ address }: { address: string }) { queryFn: async () => { try { setError(""); - console.log(provider); - const custom = new Provider({ - nodeUrl: "https://api.cartridge.gg/x/starknet/mainnet", - }); - return await custom.getClassHashAt(BigInt(address)); + return await provider.getClassHashAt(BigInt(address)); } catch (error: any) { if (error.message.includes("Contract not found")) { setError(