From ecabbbd471d3b7f6645214a3454bcf221b525fbe Mon Sep 17 00:00:00 2001 From: Iris Date: Fri, 13 Sep 2024 12:29:14 +0200 Subject: [PATCH] feat: upgrade to latest version of starknet-react & starknetkit --- components/UI/modalProfilePic.tsx | 4 +- components/discount/freeRenewalCheckout.tsx | 4 +- components/discount/registerDiscount.tsx | 4 +- components/domains/autorenewal.tsx | 4 +- components/domains/externalDomainActions.tsx | 4 +- .../domains/externalDomainTransferModal.tsx | 4 +- components/domains/steps/checkoutCard.tsx | 4 +- components/identities/actions/addEvmModal.tsx | 4 +- .../identities/actions/changeAddressModal.tsx | 6 +- .../clickable/clickablePersonhoodIcon.tsx | 4 +- .../identities/actions/identityActions.tsx | 8 +- .../identities/actions/subdomainModal.tsx | 6 +- .../identities/actions/transferFormModal.tsx | 6 +- components/solana/changeAddressModal.tsx | 4 +- components/solana/domainActions.tsx | 12 +- hooks/naming.ts | 6 +- hooks/paymaster.tsx | 4 +- hooks/useAllowanceCheck.tsx | 4 +- hooks/useBalances.tsx | 6 +- hooks/useHasClaimSolSubdomain.ts | 6 +- hooks/useNeedAllowances.tsx | 6 +- hooks/useWhitelistedNFTs.tsx | 6 +- package-lock.json | 197 ++++++++++++++---- package.json | 6 +- pages/_app.tsx | 16 +- pages/discord.tsx | 8 +- pages/github.tsx | 8 +- pages/identities.tsx | 8 +- pages/solana.tsx | 8 +- pages/twitter.tsx | 8 +- utils/connectorWrapper.ts | 17 +- 31 files changed, 262 insertions(+), 130 deletions(-) diff --git a/components/UI/modalProfilePic.tsx b/components/UI/modalProfilePic.tsx index dc393dae..f82c4322 100644 --- a/components/UI/modalProfilePic.tsx +++ b/components/UI/modalProfilePic.tsx @@ -7,7 +7,7 @@ import ClickableAction from "./iconsComponents/clickableAction"; import theme from "../../styles/theme"; import DoneFilledIcon from "./iconsComponents/icons/doneFilledIcon"; import ArrowLeftIcon from "./iconsComponents/icons/arrowLeftIcon"; -import { useContractWrite } from "@starknet-react/core"; +import { useSendTransaction } from "@starknet-react/core"; import { Call } from "starknet"; import identityChangeCalls from "../../utils/callData/identityChangeCalls"; import { hexToDecimal, toUint256 } from "../../utils/feltService"; @@ -32,7 +32,7 @@ const ModalProfilePic: FunctionComponent = ({ }) => { const [callData, setCallData] = useState([]); const { addTransaction } = useNotificationManager(); - const { writeAsync: execute, data: updateData } = useContractWrite({ + const { sendAsync: execute, data: updateData } = useSendTransaction({ calls: callData, }); diff --git a/components/discount/freeRenewalCheckout.tsx b/components/discount/freeRenewalCheckout.tsx index 966ccfa3..7c50ad38 100644 --- a/components/discount/freeRenewalCheckout.tsx +++ b/components/discount/freeRenewalCheckout.tsx @@ -1,7 +1,7 @@ import React from "react"; import { FunctionComponent, useEffect, useState } from "react"; import Button from "../UI/button"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { formatHexString, isValidEmail, @@ -83,7 +83,7 @@ const FreeRenewalCheckout: FunctionComponent = ({ const [selectedDomains, setSelectedDomains] = useState>(); const { address } = useAccount(); - const { writeAsync: execute, data: renewData } = useContractWrite({ + const { sendAsync: execute, data: renewData } = useSendTransaction({ calls: callData, }); const [domainsMinting, setDomainsMinting] = diff --git a/components/discount/registerDiscount.tsx b/components/discount/registerDiscount.tsx index 2498afd1..2c4fc95c 100644 --- a/components/discount/registerDiscount.tsx +++ b/components/discount/registerDiscount.tsx @@ -1,7 +1,7 @@ import React from "react"; import { FunctionComponent, useEffect, useState } from "react"; import Button from "../UI/button"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { utils } from "starknetid.js"; import { formatHexString, @@ -86,7 +86,7 @@ const RegisterDiscount: FunctionComponent = ({ const [renewalBox, setRenewalBox] = useState(false); const [metadataHash, setMetadataHash] = useState(); const { account, address } = useAccount(); - const { writeAsync: execute, data: registerData } = useContractWrite({ + const { sendAsync: execute, data: registerData } = useSendTransaction({ calls: callData, }); const hasMainDomain = !useDisplayName(address ?? "", false).startsWith("0x"); diff --git a/components/domains/autorenewal.tsx b/components/domains/autorenewal.tsx index a1b94822..f3b45f96 100644 --- a/components/domains/autorenewal.tsx +++ b/components/domains/autorenewal.tsx @@ -1,7 +1,7 @@ import React from "react"; import { FunctionComponent, useEffect, useState } from "react"; import Button from "../UI/button"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { formatHexString, isValidEmail, @@ -74,7 +74,7 @@ const Subscription: FunctionComponent = ({ groups }) => { const [selectedDomains, setSelectedDomains] = useState>(); const { address } = useAccount(); - const { writeAsync: execute, data: autorenewData } = useContractWrite({ + const { sendAsync: execute, data: autorenewData } = useSendTransaction({ calls: callData, }); const [domainsMinting, setDomainsMinting] = diff --git a/components/domains/externalDomainActions.tsx b/components/domains/externalDomainActions.tsx index a13e2e35..3f78a4b7 100644 --- a/components/domains/externalDomainActions.tsx +++ b/components/domains/externalDomainActions.tsx @@ -1,6 +1,6 @@ import React from "react"; import { FunctionComponent, useEffect, useState } from "react"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import styles from "../../styles/components/identityMenu.module.css"; import { utils } from "starknetid.js"; import ClickableAction from "../UI/iconsComponents/clickableAction"; @@ -42,7 +42,7 @@ const ExternalDomainActions: FunctionComponent = ({ }); //Set as main domain execute - const { writeAsync: set_address_to_domain } = useContractWrite({ + const { sendAsync: set_address_to_domain } = useSendTransaction({ calls: [resolverCalls.setAddresstoDomain(callDataEncodedDomain)], }); diff --git a/components/domains/externalDomainTransferModal.tsx b/components/domains/externalDomainTransferModal.tsx index 0c390228..42a36bcb 100644 --- a/components/domains/externalDomainTransferModal.tsx +++ b/components/domains/externalDomainTransferModal.tsx @@ -5,7 +5,7 @@ import React, { useContext, } from "react"; import { TextField, InputAdornment } from "@mui/material"; -import { useContractWrite } from "@starknet-react/core"; +import { useSendTransaction } from "@starknet-react/core"; import { useRouter } from "next/router"; import { isHexString, minifyAddress } from "../../utils/stringService"; import { utils } from "starknetid.js"; @@ -45,7 +45,7 @@ const ExternalDomainsTransferModal: FunctionComponent< const [isSendingTx, setIsSendingTx] = useState(false); const [callData, setCallData] = useState([]); - const { writeAsync: transfer_name, data: transferData } = useContractWrite({ + const { sendAsync: transfer_name, data: transferData } = useSendTransaction({ calls: callData, }); diff --git a/components/domains/steps/checkoutCard.tsx b/components/domains/steps/checkoutCard.tsx index 47dd2ec3..43b88a2b 100644 --- a/components/domains/steps/checkoutCard.tsx +++ b/components/domains/steps/checkoutCard.tsx @@ -13,7 +13,7 @@ import { NotificationType, TransactionType, } from "@/utils/constants"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import Button from "@/components/UI/button"; import RegisterSummary from "../registerSummary"; import { useNotificationManager } from "@/hooks/useNotificationManager"; @@ -52,7 +52,7 @@ const CheckoutCard: FunctionComponent = ({ const { addTransaction } = useNotificationManager(); const tokenBalances = useBalances(address); // fetch the user balances for all whitelisted tokens const [callData, setCallData] = useState([]); - const { writeAsync: execute, data: checkoutData } = useContractWrite({ + const { sendAsync: execute, data: checkoutData } = useSendTransaction({ calls: callData, }); diff --git a/components/identities/actions/addEvmModal.tsx b/components/identities/actions/addEvmModal.tsx index 4c94c17d..9628f97e 100644 --- a/components/identities/actions/addEvmModal.tsx +++ b/components/identities/actions/addEvmModal.tsx @@ -4,7 +4,7 @@ import { Modal, TextField, } from "@mui/material"; -import { useContractWrite } from "@starknet-react/core"; +import { useSendTransaction } from "@starknet-react/core"; import React, { FunctionComponent, useEffect, useRef, useState } from "react"; import styles from "../../../styles/components/evmModalMessage.module.css"; import Button from "../../UI/button"; @@ -42,7 +42,7 @@ const AddEvmModal: FunctionComponent = ({ const abortControllerRef = useRef(null); const [isSendingTx, setIsSendingTx] = useState(false); - const { writeAsync: set_user_data, data: userData } = useContractWrite({ + const { sendAsync: set_user_data, data: userData } = useSendTransaction({ calls: identity && isValid ? [ diff --git a/components/identities/actions/changeAddressModal.tsx b/components/identities/actions/changeAddressModal.tsx index f510f2e3..c1df5a20 100644 --- a/components/identities/actions/changeAddressModal.tsx +++ b/components/identities/actions/changeAddressModal.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent, useEffect, useState } from "react"; import { TextField } from "@mui/material"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { isHexString, minifyAddress } from "../../../utils/stringService"; import { hexToDecimal } from "../../../utils/feltService"; import { useNotificationManager } from "../../../hooks/useNotificationManager"; @@ -30,8 +30,8 @@ const ChangeAddressModal: FunctionComponent = ({ const [isTxSent, setIsTxSent] = useState(false); const [isSendingTx, setIsSendingTx] = useState(false); - const { writeAsync: set_domain_to_address, data: domainToAddressData } = - useContractWrite({ + const { sendAsync: set_domain_to_address, data: domainToAddressData } = + useSendTransaction({ calls: identity ? identityChangeCalls.setStarknetAddress( identity, diff --git a/components/identities/actions/clickable/clickablePersonhoodIcon.tsx b/components/identities/actions/clickable/clickablePersonhoodIcon.tsx index ad24e861..95a81e3a 100644 --- a/components/identities/actions/clickable/clickablePersonhoodIcon.tsx +++ b/components/identities/actions/clickable/clickablePersonhoodIcon.tsx @@ -14,7 +14,7 @@ import { } from "@anima-protocol/personhood-sdk-react"; import { useAccount } from "@starknet-react/core"; import { Call, TypedData } from "starknet"; -import { useContractWrite } from "@starknet-react/core"; +import { useSendTransaction } from "@starknet-react/core"; import { hexToDecimal } from "../../../../utils/feltService"; import { bigintToStringHex, @@ -46,7 +46,7 @@ const ClickablePersonhoodIcon: FunctionComponent< const [isLoading, setIsLoading] = useState(false); const [callData, setCallData] = useState(); const { addTransaction } = useNotificationManager(); - const { writeAsync: execute, data: verifierData } = useContractWrite({ + const { sendAsync: execute, data: verifierData } = useSendTransaction({ calls: [callData as Call], }); const network = diff --git a/components/identities/actions/identityActions.tsx b/components/identities/actions/identityActions.tsx index 2535cf7c..625f2b8e 100644 --- a/components/identities/actions/identityActions.tsx +++ b/components/identities/actions/identityActions.tsx @@ -1,6 +1,6 @@ import React, { useContext, useMemo } from "react"; import { FunctionComponent, useEffect, useState } from "react"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import ChangeAddressModal from "./changeAddressModal"; import TransferFormModal from "./transferFormModal"; import SubdomainModal from "./subdomainModal"; @@ -66,8 +66,8 @@ const IdentityActions: FunctionComponent = ({ const [disableRenewalCalldata, setDisableRenewalCalldata] = useState( [] ); - const { writeAsync: disableRenewal, data: disableRenewalData } = - useContractWrite({ + const { sendAsync: disableRenewal, data: disableRenewalData } = + useSendTransaction({ calls: disableRenewalCalldata, }); @@ -102,7 +102,7 @@ const IdentityActions: FunctionComponent = ({ callDataEncodedDomain.push(domain.toString(10)); }); - const { writeAsync: setMainId, data: mainDomainData } = useContractWrite({ + const { sendAsync: setMainId, data: mainDomainData } = useSendTransaction({ calls: identity ? identityChangeCalls.setAsMainId( identity, diff --git a/components/identities/actions/subdomainModal.tsx b/components/identities/actions/subdomainModal.tsx index 5b23a7f6..bb26363f 100644 --- a/components/identities/actions/subdomainModal.tsx +++ b/components/identities/actions/subdomainModal.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent, useEffect, useState } from "react"; import { TextField } from "@mui/material"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { useIsValid } from "../../../hooks/naming"; import { numberToString } from "../../../utils/stringService"; import SelectIdentity from "../../domains/selectIdentity"; @@ -32,8 +32,8 @@ const SubdomainModal: FunctionComponent = ({ const [callData, setCallData] = useState([]); const { address } = useAccount(); const { addTransaction } = useNotificationManager(); - const { writeAsync: transfer_domain, data: transferDomainData } = - useContractWrite({ + const { sendAsync: transfer_domain, data: transferDomainData } = + useSendTransaction({ calls: callData, }); const [isTxSent, setIsTxSent] = useState(false); diff --git a/components/identities/actions/transferFormModal.tsx b/components/identities/actions/transferFormModal.tsx index 8c9faa69..65bd927e 100644 --- a/components/identities/actions/transferFormModal.tsx +++ b/components/identities/actions/transferFormModal.tsx @@ -5,7 +5,7 @@ import React, { useContext, } from "react"; import { TextField, InputAdornment } from "@mui/material"; -import { useContractWrite } from "@starknet-react/core"; +import { useSendTransaction } from "@starknet-react/core"; import { useRouter } from "next/router"; import { isHexString, minifyAddress } from "../../../utils/stringService"; import { utils } from "starknetid.js"; @@ -36,8 +36,8 @@ const TransferFormModal: FunctionComponent = ({ const [isTxSent, setIsTxSent] = useState(false); const [isSendingTx, setIsSendingTx] = useState(false); - const { writeAsync: transfer_identity_and_set_domain, data: transferData } = - useContractWrite({ + const { sendAsync: transfer_identity_and_set_domain, data: transferData } = + useSendTransaction({ calls: identity ? identityChangeCalls.transfer(identity, targetAddress) : [], diff --git a/components/solana/changeAddressModal.tsx b/components/solana/changeAddressModal.tsx index 6294dd55..900c9706 100644 --- a/components/solana/changeAddressModal.tsx +++ b/components/solana/changeAddressModal.tsx @@ -1,5 +1,5 @@ import { Modal, TextField } from "@mui/material"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import React, { FunctionComponent, useEffect, useState } from "react"; import { isHexString, minifyAddress } from "../../utils/stringService"; import styles from "../../styles/components/modalMessage.module.css"; @@ -30,7 +30,7 @@ const ChangeAddressModal: FunctionComponent = ({ const { addTransaction } = useNotificationManager(); const [isTxSent, setIsTxSent] = useState(false); const [callData, setCallData] = useState([]); - const { writeAsync: setResolving, data: resolvingData } = useContractWrite({ + const { sendAsync: setResolving, data: resolvingData } = useSendTransaction({ calls: callData, }); diff --git a/components/solana/domainActions.tsx b/components/solana/domainActions.tsx index e7685678..db711fba 100644 --- a/components/solana/domainActions.tsx +++ b/components/solana/domainActions.tsx @@ -12,8 +12,8 @@ import styles from "../../styles/solana.module.css"; import { Abi, Call } from "starknet"; import { useAccount, - useContractRead, - useContractWrite, + useReadContract, + useSendTransaction, } from "@starknet-react/core"; import SolanaCalls from "../../utils/callData/solanaCalls"; import { utils } from "starknetid.js"; @@ -36,16 +36,16 @@ const DomainActions: FunctionComponent = ({ name }) => { const { addTransaction } = useNotificationManager(); const [isTxSent, setIsTxSent] = useState(false); const [mainDomainCalldata, setMainDomainCalldata] = useState([]); - const { writeAsync: executeMainDomain, data: mainDomainData } = - useContractWrite({ + const { sendAsync: executeMainDomain, data: mainDomainData } = + useSendTransaction({ calls: mainDomainCalldata, }); const { contract } = useNamingContract(); const encodedDomain = utils .encodeDomain(`${name}.sol.stark`) .map((x) => x.toString()); - const { data: resolveData } = useContractRead({ - address: contract?.address as string, + const { data: resolveData } = useReadContract({ + address: contract?.address as HexString, abi: contract?.abi as Abi, functionName: "domain_to_address", args: [encodedDomain, []], diff --git a/hooks/naming.ts b/hooks/naming.ts index 8609b5f6..8641b165 100644 --- a/hooks/naming.ts +++ b/hooks/naming.ts @@ -1,4 +1,4 @@ -import { useContractRead } from "@starknet-react/core"; +import { useReadContract } from "@starknet-react/core"; import { useNamingContract } from "./contracts"; import { useContext, useEffect, useState } from "react"; import { utils } from "starknetid.js"; @@ -105,8 +105,8 @@ export function useDataFromDomain(domain: string): FullDomainData { ? utils.encodeDomain(domain).map((elem) => elem.toString()) // remove when dapp uses starknet.js v5 : []; - const { data, error } = useContractRead({ - address: contract?.address as string, + const { data, error } = useReadContract({ + address: contract?.address as HexString, abi: contract?.abi as Abi, functionName: "domain_to_data", args: [encoded], diff --git a/hooks/paymaster.tsx b/hooks/paymaster.tsx index 6399cfc9..ccb74b93 100644 --- a/hooks/paymaster.tsx +++ b/hooks/paymaster.tsx @@ -13,7 +13,7 @@ import { useProvider, useAccount, useConnect, - useContractWrite, + useSendTransaction, } from "@starknet-react/core"; import { AccountInterface, @@ -49,7 +49,7 @@ const usePaymaster = ( ); const [gasTokenPrice, setGasTokenPrice] = useState(); const [loadingGas, setLoadingGas] = useState(false); - const { writeAsync: execute, data } = useContractWrite({ + const { sendAsync: execute, data } = useSendTransaction({ calls: callData, }); const { connector } = useConnect(); diff --git a/hooks/useAllowanceCheck.tsx b/hooks/useAllowanceCheck.tsx index c9576824..2bbfdd68 100644 --- a/hooks/useAllowanceCheck.tsx +++ b/hooks/useAllowanceCheck.tsx @@ -1,4 +1,4 @@ -import { useContractRead } from "@starknet-react/core"; +import { useReadContract } from "@starknet-react/core"; import { useEtherContract } from "./contracts"; import { Abi } from "starknet"; import { useEffect, useState } from "react"; @@ -17,7 +17,7 @@ export default function useAllowanceCheck( const [currentAllowance, setCurrentAllowance] = useState(BigInt(0)); const { contract: etherContract } = useEtherContract(); const { data: erc20AllowanceData, error: erc20AllowanceError } = - useContractRead({ + useReadContract({ address: ERC20Contract[erc20], abi: etherContract?.abi as Abi, functionName: "allowance", diff --git a/hooks/useBalances.tsx b/hooks/useBalances.tsx index 7fad5210..66a41a12 100644 --- a/hooks/useBalances.tsx +++ b/hooks/useBalances.tsx @@ -1,4 +1,4 @@ -import { useContractRead } from "@starknet-react/core"; +import { useReadContract } from "@starknet-react/core"; import { useMulticallContract } from "./contracts"; import { Abi, BlockTag, CairoCustomEnum, Call, RawArgs, hash } from "starknet"; import { useEffect, useState } from "react"; @@ -9,8 +9,8 @@ export default function useBalances(address?: string) { const [balances, setBalances] = useState({}); const [callData, setCallData] = useState([]); const { contract: multicallContract } = useMulticallContract(); - const { data: erc20BalanceData, error: erc20BalanceError } = useContractRead({ - address: multicallContract?.address as string, + const { data: erc20BalanceData, error: erc20BalanceError } = useReadContract({ + address: multicallContract?.address as HexString, abi: multicallContract?.abi as Abi, functionName: "aggregate", args: callData, diff --git a/hooks/useHasClaimSolSubdomain.ts b/hooks/useHasClaimSolSubdomain.ts index 0a05298a..a1109247 100644 --- a/hooks/useHasClaimSolSubdomain.ts +++ b/hooks/useHasClaimSolSubdomain.ts @@ -1,4 +1,4 @@ -import { useContractRead } from "@starknet-react/core"; +import { useReadContract } from "@starknet-react/core"; import { useSolSubdomainContract } from "./contracts"; import { Abi } from "starknet"; import { useEffect, useState } from "react"; @@ -11,8 +11,8 @@ export default function useHasClaimSolSubdomain( ) { const [claimedDomains, setClaimedDomains] = useState([]); const { contract } = useSolSubdomainContract(); - const { data: claimedData, error: claimedError } = useContractRead({ - address: contract?.address as string, + const { data: claimedData, error: claimedError } = useReadContract({ + address: contract?.address as HexString, abi: contract?.abi as Abi, functionName: "were_claimed", args: [ diff --git a/hooks/useNeedAllowances.tsx b/hooks/useNeedAllowances.tsx index 0635273e..986ecb1f 100644 --- a/hooks/useNeedAllowances.tsx +++ b/hooks/useNeedAllowances.tsx @@ -1,4 +1,4 @@ -import { useContractRead } from "@starknet-react/core"; +import { useReadContract } from "@starknet-react/core"; import { useMulticallContract } from "./contracts"; import { Abi, BlockTag, CairoCustomEnum, Call, RawArgs, hash } from "starknet"; import { useEffect, useState, useMemo } from "react"; @@ -24,8 +24,8 @@ export default function useNeedsAllowances( const [callData, setCallData] = useState([]); const { contract: multicallContract } = useMulticallContract(); const { data: erc20AllowanceData, error: erc20AllowanceError } = - useContractRead({ - address: multicallContract?.address as string, + useReadContract({ + address: multicallContract?.address as HexString, abi: multicallContract?.abi as Abi, functionName: "aggregate", args: callData, diff --git a/hooks/useWhitelistedNFTs.tsx b/hooks/useWhitelistedNFTs.tsx index 1cb87fe0..3d02c206 100644 --- a/hooks/useWhitelistedNFTs.tsx +++ b/hooks/useWhitelistedNFTs.tsx @@ -1,4 +1,4 @@ -import { useContractRead } from "@starknet-react/core"; +import { useReadContract } from "@starknet-react/core"; import { useNftPpVerifierContract } from "./contracts"; import { Abi } from "starknet"; import { useEffect, useState } from "react"; @@ -11,8 +11,8 @@ export default function useWhitelistedNFTs(address: string) { ); const [userNfts, setUserNfts] = useState([]); const { contract } = useNftPpVerifierContract(); - const { data: whitelistData, error: whitelistError } = useContractRead({ - address: contract?.address as string, + const { data: whitelistData, error: whitelistError } = useReadContract({ + address: contract?.address as HexString, abi: contract?.abi as Abi, functionName: "get_whitelisted_contracts", args: [], diff --git a/package-lock.json b/package-lock.json index dd5c0904..5f09f878 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,8 +20,8 @@ "@solana/wallet-adapter-react-ui": "^0.9.34", "@solana/wallet-adapter-wallets": "^0.19.23", "@solana/web3.js": "^1.87.6", - "@starknet-react/chains": "^0.1.7", - "@starknet-react/core": "^2.8.3", + "@starknet-react/chains": "^3.0.0", + "@starknet-react/core": "^3.0.0", "@vercel/analytics": "^0.1.5", "@walnuthq/sdk": "^1.1.10", "axios": "^1.4.0", @@ -45,7 +45,7 @@ "react-loader-spinner": "5.4.5", "starknet": "6.9.0", "starknetid.js": "^4.0.0", - "starknetkit": "^1.1.9", + "starknetkit": "^2.3.0", "tldts": "^6.1.20", "twitter-api-sdk": "^1.2.1" }, @@ -5563,9 +5563,9 @@ "integrity": "sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==" }, "node_modules/@scure/base": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.7.tgz", - "integrity": "sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==", "funding": { "url": "https://paulmillr.com/funding/" } @@ -7418,31 +7418,50 @@ "@stablelib/wipe": "^1.0.1" } }, + "node_modules/@starknet-io/get-starknet": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@starknet-io/get-starknet/-/get-starknet-4.0.0.tgz", + "integrity": "sha512-SmnRzBewS0BVjtKzViSrWXi+SvOnSrj9hnvlx8B3ZnCq9A2NuX8pNI550lDBLl/ilIr587FH2VNAj6jdgsyhJQ==", + "dependencies": { + "@starknet-io/get-starknet-core": "4.0.0", + "bowser": "^2.11.0" + } + }, + "node_modules/@starknet-io/get-starknet-core": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@starknet-io/get-starknet-core/-/get-starknet-core-4.0.0.tgz", + "integrity": "sha512-M++JTbMxZJ5wCkw1f4vAXCY3BTlRMdxFScqsIgZonLXD3GKHPyM/pFi/JqorPO1o4RKHLnFX6M7r0izZ/NWpvA==", + "dependencies": { + "@module-federation/runtime": "^0.1.2", + "@starknet-io/types-js": "^0.7.7" + } + }, "node_modules/@starknet-io/types-js": { "version": "0.7.7", "resolved": "https://registry.npmjs.org/@starknet-io/types-js/-/types-js-0.7.7.tgz", "integrity": "sha512-WLrpK7LIaIb8Ymxu6KF/6JkGW1sso988DweWu7p5QY/3y7waBIiPvzh27D9bX5KIJNRDyOoOVoHVEKYUYWZ/RQ==" }, "node_modules/@starknet-react/chains": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@starknet-react/chains/-/chains-0.1.7.tgz", - "integrity": "sha512-UNh97I1SvuJKaAhKOmpEk8JcWuZWMlPG/ba2HcvFYL9x/47BKndJ+Da9V+iJFtkHUjreVnajT1snsaz1XMG+UQ==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@starknet-react/chains/-/chains-3.0.0.tgz", + "integrity": "sha512-+XulhJZMSDAEX9JXHI5qJetHlf1Xr0nc7K2+efUMotGxXM31ovKWc/0JFlJh9Jwjgik/UO859Dh4yLkb92PAhw==" }, "node_modules/@starknet-react/core": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/@starknet-react/core/-/core-2.8.3.tgz", - "integrity": "sha512-WfiC5hVqA5FdinM2PPT3qEZGmGdh9ay7iRR8L1Ooc8bYKH6bpaXHLG+n42OHeenOWVXAH8U7ZYmhcF6OFWopCA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@starknet-react/core/-/core-3.0.0.tgz", + "integrity": "sha512-r3oZ5oGC2V3fNoCK1yua6yab4aJpmcuCnxN/RGGdTnJwy5GNO8q819qmsqBB7x61+zMCrwc+QN/FxvKGDbwJjw==", "dependencies": { - "@starknet-react/chains": "^0.1.7", - "@tanstack/react-query": "^5.0.1", + "@starknet-io/types-js": "^0.7.7", + "@starknet-react/chains": "^3.0.0", + "@tanstack/react-query": "^5.25.0", "eventemitter3": "^5.0.1", - "immutable": "^4.3.4", - "zod": "^3.22.2" + "viem": "^2.19.1", + "zod": "^3.22.4" }, "peerDependencies": { - "get-starknet-core": "^3.2.0", + "get-starknet-core": "^4.0.0", "react": "^18.0", - "starknet": "^5.25.0" + "starknet": "^6.11.0" } }, "node_modules/@starknet-react/core/node_modules/eventemitter3": { @@ -7465,27 +7484,27 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.48.0.tgz", - "integrity": "sha512-lZAfPPeVIqXCswE9SSbG33B6/91XOWt/Iq41bFeWb/mnHwQSIfFRbkS4bfs+WhIk9abRArF9Id2fp0Mgo+hq6Q==", + "version": "5.56.2", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.56.2.tgz", + "integrity": "sha512-gor0RI3/R5rVV3gXfddh1MM+hgl0Z4G7tj6Xxpq6p2I03NGPaJ8dITY9Gz05zYYb/EJq9vPas/T4wn9EaDPd4Q==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" } }, "node_modules/@tanstack/react-query": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.48.0.tgz", - "integrity": "sha512-GDExbjYWzvDokyRqMSWXdrPiYpp95Aig0oeMIrxTaruOJJgWiWfUP//OAaowm2RrRkGVsavSZdko/XmIrrV2Nw==", + "version": "5.56.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.56.2.tgz", + "integrity": "sha512-SR0GzHVo6yzhN72pnRhkEFRAHMsUo5ZPzAxfTMvUxFIDVS6W9LYUp6nXW3fcHVdg0ZJl8opSH85jqahvm6DSVg==", "dependencies": { - "@tanstack/query-core": "5.48.0" + "@tanstack/query-core": "5.56.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "react": "^18.0.0" + "react": "^18 || ^19" } }, "node_modules/@toruslabs/base-controllers": { @@ -9131,6 +9150,26 @@ "generate": "dist/generate.js" } }, + "node_modules/abitype": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.5.tgz", + "integrity": "sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==", + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -13302,11 +13341,6 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, - "node_modules/immutable": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", - "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==" - }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -13926,6 +13960,20 @@ "ws": "*" } }, + "node_modules/isows": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.4.tgz", + "integrity": "sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wagmi-dev" + } + ], + "peerDependencies": { + "ws": "*" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -18870,24 +18918,26 @@ } }, "node_modules/starknetkit": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/starknetkit/-/starknetkit-1.1.9.tgz", - "integrity": "sha512-KarnNS9sJoImTdpTKizyNzDlQSAOutbzuZ6CzHQpJHWzaf8ION9aIf+d87sY7hSlbmD7cqGRUG28Hpke24arCg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/starknetkit/-/starknetkit-2.3.0.tgz", + "integrity": "sha512-xW78arRWHgXvAJuzM1kgiVWeAfG5t9QsxWLgET+pliuqXkBCJTbK/11UdByQ3ga69q+4JWEopDdChBI3YyP4Bw==", "dependencies": { + "@starknet-io/get-starknet": "^4.0.0", + "@starknet-io/get-starknet-core": "^4.0.0", + "@starknet-io/types-js": "^0.7.7", "@trpc/client": "^10.38.1", "@trpc/server": "^10.38.1", - "@walletconnect/sign-client": "^2.10.1", + "@walletconnect/sign-client": "^2.11.0", "bowser": "^2.11.0", "detect-browser": "^5.3.0", "eventemitter3": "^5.0.1", "events": "^3.3.0", - "get-starknet-core": "^3.1.0", "lodash-es": "^4.17.21", "svelte-forms": "^2.3.1", "trpc-browser": "^1.3.2" }, "peerDependencies": { - "starknet": "^6.7.0" + "starknet": "^6.9.0" } }, "node_modules/starknetkit/node_modules/detect-browser": { @@ -20230,6 +20280,64 @@ "node": ">= 0.8" } }, + "node_modules/viem": { + "version": "2.21.6", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.21.6.tgz", + "integrity": "sha512-YX48IVl6nZ4FRsY4ypv2RrxtQVWysIY146/lBW53tma8u32h8EsiA7vecw9ZbrueNUy/asHR4Egu68Z6FOvDzQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.0", + "@noble/curves": "1.4.0", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.4.0", + "abitype": "1.0.5", + "isows": "1.0.4", + "webauthn-p256": "0.0.5", + "ws": "8.17.1" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/@adraffy/ens-normalize": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz", + "integrity": "sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==" + }, + "node_modules/viem/node_modules/@scure/bip39": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.4.0.tgz", + "integrity": "sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==", + "dependencies": { + "@noble/hashes": "~1.5.0", + "@scure/base": "~1.1.8" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/vite": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", @@ -20515,6 +20623,21 @@ "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.2.0.tgz", "integrity": "sha512-ohj72kbtVWCpKYMxcbJ+xaOBV3En76hW47j52dG+tEGG36LZQgfFw5yHl9xyjmosy3XUMn8d/GBUAy4YPM839w==" }, + "node_modules/webauthn-p256": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/webauthn-p256/-/webauthn-p256-0.0.5.tgz", + "integrity": "sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "dependencies": { + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.4.0" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", diff --git a/package.json b/package.json index a9496006..88e40ac6 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "@solana/wallet-adapter-react-ui": "^0.9.34", "@solana/wallet-adapter-wallets": "^0.19.23", "@solana/web3.js": "^1.87.6", - "@starknet-react/chains": "^0.1.7", - "@starknet-react/core": "^2.8.3", + "@starknet-react/chains": "^3.0.0", + "@starknet-react/core": "^3.0.0", "@vercel/analytics": "^0.1.5", "@walnuthq/sdk": "^1.1.10", "axios": "^1.4.0", @@ -47,7 +47,7 @@ "react-loader-spinner": "5.4.5", "starknet": "6.9.0", "starknetid.js": "^4.0.0", - "starknetkit": "^1.1.9", + "starknetkit": "^2.3.0", "tldts": "^6.1.20", "twitter-api-sdk": "^1.2.1" }, diff --git a/pages/_app.tsx b/pages/_app.tsx index 673fc288..2c545004 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -5,14 +5,17 @@ import Navbar from "../components/UI/navbar"; import Head from "next/head"; import { ThemeProvider } from "@mui/material"; import theme from "../styles/theme"; -import { StarknetConfig, jsonRpcProvider } from "@starknet-react/core"; +import { + Connector, + StarknetConfig, + jsonRpcProvider, +} from "@starknet-react/core"; import { Analytics } from "@vercel/analytics/react"; import { StarknetIdJsProvider } from "../context/StarknetIdJsProvider"; import { PostHogProvider } from "posthog-js/react"; import posthog from "posthog-js"; import AcceptCookies from "../components/legal/acceptCookies"; import { Chain, sepolia, mainnet } from "@starknet-react/chains"; -import { addWalnutLogsToConnectors } from "@walnuthq/sdk"; // Solana import { clusterApiUrl } from "@solana/web3.js"; import { WalletAdapterNetwork } from "@solana/wallet-adapter-base"; @@ -93,10 +96,11 @@ function MyApp({ Component, pageProps }: AppProps) { chains={chains} provider={providers} connectors={ - addWalnutLogsToConnectors({ - connectors: getConnectors(), - apiKey: process.env.NEXT_PUBLIC_WALNUT_API_KEY as string, - }) as any + getConnectors() as Connector[] + // addWalnutLogsToConnectors({ + // connectors: getConnectors(), + // apiKey: process.env.NEXT_PUBLIC_WALNUT_API_KEY as string, + // }) as any } autoConnect > diff --git a/pages/discord.tsx b/pages/discord.tsx index 44a93314..bab1b617 100644 --- a/pages/discord.tsx +++ b/pages/discord.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import styles from "../styles/Home.module.css"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { useEffect } from "react"; import { useRouter } from "next/router"; import ErrorScreen from "../components/UI/screens/errorScreen"; @@ -32,7 +32,7 @@ const Discord: NextPage = () => { // Access localStorage const [tokenId, setTokenId] = useState(""); - const [calls, setCalls] = useState(); + const [calls, setCalls] = useState({} as Call); useEffect(() => { if (!tokenId) { @@ -101,9 +101,9 @@ const Discord: NextPage = () => { //Contract const { data: discordVerificationData, - writeAsync: execute, + sendAsync: execute, error: discordVerificationError, - } = useContractWrite({ calls: [calls as Call] }); + } = useSendTransaction({ calls: [calls as Call] }); function verifyDiscord() { execute(); diff --git a/pages/github.tsx b/pages/github.tsx index f0d45b6a..79be15f1 100644 --- a/pages/github.tsx +++ b/pages/github.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import styles from "../styles/Home.module.css"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { useEffect } from "react"; import { useRouter } from "next/router"; import ErrorScreen from "../components/UI/screens/errorScreen"; @@ -26,7 +26,7 @@ const Github: NextPage = () => { // Access localStorage const [tokenId, setTokenId] = useState(""); - const [calls, setCalls] = useState(); + const [calls, setCalls] = useState({} as Call); useEffect(() => { if (!tokenId) { @@ -93,9 +93,9 @@ const Github: NextPage = () => { //Contract const { data: githubVerificationData, - writeAsync: execute, + sendAsync: execute, error: githubVerificationError, - } = useContractWrite({ calls: [calls as Call] }); + } = useSendTransaction({ calls: [calls as Call] }); function verifyGithub() { execute(); diff --git a/pages/identities.tsx b/pages/identities.tsx index 249feba8..aa6c9564 100644 --- a/pages/identities.tsx +++ b/pages/identities.tsx @@ -1,7 +1,11 @@ import React, { useMemo } from "react"; import type { NextPage } from "next"; import styles from "../styles/Home.module.css"; -import { useAccount, useConnect, useContractWrite } from "@starknet-react/core"; +import { + useAccount, + useConnect, + useSendTransaction, +} from "@starknet-react/core"; import { useEffect, useState } from "react"; import IdentitiesGallery from "../components/identities/identitiesGalleryV1"; import MintIcon from "../components/UI/iconsComponents/icons/mintIcon"; @@ -37,7 +41,7 @@ const Identities: NextPage = () => { }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []); // We want this to run only once - const { writeAsync: execute, data: mintData } = useContractWrite({ + const { sendAsync: execute, data: mintData } = useSendTransaction({ calls: [callData], }); diff --git a/pages/solana.tsx b/pages/solana.tsx index 76f8831f..8c6223e8 100644 --- a/pages/solana.tsx +++ b/pages/solana.tsx @@ -4,7 +4,11 @@ import Image from "next/image"; import AffiliateImage from "../public/visuals/affiliate.webp"; import Button from "../components/UI/button"; import StarknetIcon from "../components/UI/iconsComponents/icons/starknetIcon"; -import { useAccount, useConnect, useContractWrite } from "@starknet-react/core"; +import { + useAccount, + useConnect, + useSendTransaction, +} from "@starknet-react/core"; import ProgressBar from "../components/UI/progressBar"; import { NextPage } from "next"; import { WalletMultiButton } from "@solana/wallet-adapter-react-ui"; @@ -50,7 +54,7 @@ const Solana: NextPage = () => { starknetAddress as string ); const [callData, setCallData] = useState([]); - const { writeAsync: execute, data: registerData } = useContractWrite({ + const { sendAsync: execute, data: registerData } = useSendTransaction({ calls: callData, }); const [open, setOpen] = useState(true); diff --git a/pages/twitter.tsx b/pages/twitter.tsx index 8d26dd74..9813fb61 100644 --- a/pages/twitter.tsx +++ b/pages/twitter.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import homeStyles from "../styles/Home.module.css"; -import { useAccount, useContractWrite } from "@starknet-react/core"; +import { useAccount, useSendTransaction } from "@starknet-react/core"; import { useEffect } from "react"; import { useRouter } from "next/router"; import ErrorScreen from "../components/UI/screens/errorScreen"; @@ -26,7 +26,7 @@ const Twitter: NextPage = () => { // Access localStorage const [tokenId, setTokenId] = useState(""); - const [calls, setCalls] = useState(); + const [calls, setCalls] = useState({} as Call); useEffect(() => { if (!tokenId) { @@ -95,9 +95,9 @@ const Twitter: NextPage = () => { //Contract const { data: twitterVerificationData, - writeAsync: execute, + sendAsync: execute, error: twitterVerificationError, - } = useContractWrite({ calls: [calls as Call] }); + } = useSendTransaction({ calls: [calls as Call] }); function verifyTwitter() { execute(); diff --git a/utils/connectorWrapper.ts b/utils/connectorWrapper.ts index ac189be4..ae3eb00d 100644 --- a/utils/connectorWrapper.ts +++ b/utils/connectorWrapper.ts @@ -11,17 +11,14 @@ export const getConnectors = () => { new InjectedConnector({ options: { id: "braavos" } }), new InjectedConnector({ options: { id: "okxwallet" } }), new InjectedConnector({ options: { id: "bitkeep" } }), - new ArgentMobileConnector({ - dappName: "Starknet ID", - url: process.env.NEXT_PUBLIC_APP_LINK as string, - chainId: constants.NetworkName.SN_MAIN, - icons: ["https://app.starknet.id/visuals/StarknetIdLogo.svg"], - }), + // new ArgentMobileConnector({ + // dappName: "Starknet ID", + // url: process.env.NEXT_PUBLIC_APP_LINK as string, + // chainId: constants.NetworkName.SN_MAIN, + // icons: ["https://app.starknet.id/visuals/StarknetIdLogo.svg"], + // }), new WebWalletConnector({ - url: - process.env.NEXT_PUBLIC_IS_TESTNET === "true" - ? "https://web.hydrogen.argent47.net" - : "https://web.argent.xyz/", + url: "https://web.argent.xyz/", }), ];