From eb51fff9cf8ca3fd5deac704820905c18ed230f5 Mon Sep 17 00:00:00 2001 From: SamueleA Date: Fri, 22 Sep 2023 15:47:30 -0400 Subject: [PATCH] better name --- examples/react/src/components/Homepage.tsx | 4 ++-- packages/kit/src/utils/ethAuth.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/react/src/components/Homepage.tsx b/examples/react/src/components/Homepage.tsx index 054ce3f2..b3682f29 100644 --- a/examples/react/src/components/Homepage.tsx +++ b/examples/react/src/components/Homepage.tsx @@ -1,6 +1,6 @@ import React from 'react' import qs from 'query-string' -import { useOpenConnectModal, useTheme, getEthAuthProof, validateEthProof } from '@0xsequence/kit' +import { useOpenConnectModal, useTheme, signEthAuthProof, validateEthProof } from '@0xsequence/kit' import { useOpenWalletModal } from '@0xsequence/kit-wallet' import { useCheckoutModal } from '@0xsequence/kit-checkout' import { useDisconnect, useAccount, useWalletClient, usePublicClient, useNetwork } from 'wagmi' @@ -39,7 +39,7 @@ function Homepage() { } try { - const proof = await getEthAuthProof(walletClient) + const proof = await signEthAuthProof(walletClient) console.log('proof:', proof) const isValid = await validateEthProof(walletClient, publicClient, proof) diff --git a/packages/kit/src/utils/ethAuth.tsx b/packages/kit/src/utils/ethAuth.tsx index dc14c926..1d5bc78d 100644 --- a/packages/kit/src/utils/ethAuth.tsx +++ b/packages/kit/src/utils/ethAuth.tsx @@ -9,7 +9,7 @@ import { publicClientToProvider, walletClientToSigner } from './adapters' import { LocalStorageKey, DEFAULT_SESSION_EXPIRATION } from "../constants" import { EthAuthSettings } from "../components/KitProvider" -export const getEthAuthProof = async (walletClient: WalletClient): Promise => { +export const signEthAuthProof = async (walletClient: WalletClient): Promise => { const proofInformation = localStorage.getItem(LocalStorageKey.EthAuthProof) // if proof information was generated and saved upon wallet connection, use that if (proofInformation) {