File tree Expand file tree Collapse file tree 3 files changed +487
-1077
lines changed
Expand file tree Collapse file tree 3 files changed +487
-1077
lines changed Original file line number Diff line number Diff line change 1313 "@automerge/automerge-repo-react-hooks" : " ^2.0.0-alpha.14" ,
1414 "@graphprotocol/hypergraph" : " workspace:*" ,
1515 "@noble/hashes" : " ^1.5.0" ,
16- "@privy-io/react-auth" : " ^1.88.4 " ,
16+ "@privy-io/react-auth" : " ^2.0.3 " ,
1717 "@radix-ui/react-avatar" : " ^1.1.1" ,
1818 "@radix-ui/react-icons" : " ^1.3.0" ,
1919 "@radix-ui/react-slot" : " ^1.1.0" ,
2020 "@tanstack/react-router" : " ^1.62.1" ,
2121 "class-variance-authority" : " ^0.7.0" ,
2222 "clsx" : " ^2.1.1" ,
2323 "effect" : " ^3.12.2" ,
24- "ethers" : " ^6.13.3 " ,
24+ "ethers" : " ^5.7.2 " ,
2525 "isomorphic-ws" : " ^5.0.0" ,
2626 "lucide-react" : " ^0.441.0" ,
2727 "react" : " ^18.3.1" ,
Original file line number Diff line number Diff line change 11import { Identity } from '@graphprotocol/hypergraph' ;
22import { PrivyProvider , usePrivy , useWallets } from '@privy-io/react-auth' ;
3+ import { ethers } from 'ethers' ;
34import { useEffect , useState } from 'react' ;
45
56function DoGraphLogin ( ) {
@@ -22,13 +23,14 @@ function Auth({ children }: { children: React.ReactNode }) {
2223 if ( wallets . length > 0 ) {
2324 ( async ( ) => {
2425 const embeddedWallet = wallets . find ( ( wallet ) => wallet . walletClientType === 'privy' ) || wallets [ 0 ] ;
25- const provider = await embeddedWallet . getEthersProvider ( ) ;
26- const newSigner = provider . getSigner ( ) ;
26+ const privyProvider = await embeddedWallet . getEthereumProvider ( ) ;
27+ const ethersProvider = new ethers . providers . Web3Provider ( privyProvider ) ;
28+ const newSigner = await ethersProvider . getSigner ( ) ;
2729
2830 if ( embeddedWallet . walletClientType === 'privy' ) {
2931 newSigner . signMessage = async ( message ) => {
3032 // @ts -expect-error signMessage is a string in this case
31- const signature = await signMessage ( message ) ; //, uiConfig);
33+ const { signature } = await signMessage ( { message } ) ; //, uiConfig);
3234 return signature ;
3335 } ;
3436 }
You can’t perform that action at this time.
0 commit comments