Skip to content

Commit

Permalink
better name
Browse files Browse the repository at this point in the history
  • Loading branch information
SamueleA committed Sep 22, 2023
1 parent 1096712 commit eb51fff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/react/src/components/Homepage.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/utils/ethAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<ETHAuthProof> => {
export const signEthAuthProof = async (walletClient: WalletClient): Promise<ETHAuthProof> => {
const proofInformation = localStorage.getItem(LocalStorageKey.EthAuthProof)
// if proof information was generated and saved upon wallet connection, use that
if (proofInformation) {
Expand Down

0 comments on commit eb51fff

Please sign in to comment.