Skip to content

Commit

Permalink
🔥 Remove debuggers
Browse files Browse the repository at this point in the history
  • Loading branch information
bal7hazar committed Dec 19, 2024
1 parent ce11af1 commit d7ee2e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions packages/profile/src/hooks/starknetid.ts
Original file line number Diff line number Diff line change
@@ -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 }) => {
Expand All @@ -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;
Expand Down
7 changes: 1 addition & 6 deletions packages/profile/src/hooks/wallet.ts
Original file line number Diff line number Diff line change
@@ -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[] = [

Check failure on line 5 in packages/profile/src/hooks/wallet.ts

View workflow job for this annotation

GitHub Actions / ts-lint

Prefer using the primitive `bigint` as a type name, rather than the upper-cased `BigInt`
BigInt("0x036078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f"),
Expand Down Expand Up @@ -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) {

Check failure on line 38 in packages/profile/src/hooks/wallet.ts

View workflow job for this annotation

GitHub Actions / ts-lint

Unexpected any. Specify a different type
if (error.message.includes("Contract not found")) {
setError(
Expand Down

0 comments on commit d7ee2e5

Please sign in to comment.