File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/thirdweb/src/login Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11import type { Chain } from "../../chains/types.js" ;
22import type { ThirdwebClient } from "../../client/client.js" ;
33import type { PreparedTransaction } from "../../transaction/prepare-transaction.js" ;
4+ import { getAddress } from "../../utils/address.js" ;
45import type { AsyncStorage } from "../../utils/storage/AsyncStorage.js" ;
56import { inAppWallet } from "../../wallets/in-app/web/in-app.js" ;
67import type { Account , Wallet } from "../../wallets/interfaces/wallet.js" ;
@@ -205,7 +206,10 @@ function mapAccount(
205206 : undefined ,
206207 } ) ;
207208 // if the JWT is valid, we can simply return it
208- if ( data ?. address === account . address ) {
209+ if (
210+ data ?. address &&
211+ getAddress ( data . address ) === getAddress ( account . address )
212+ ) {
209213 // set the JWT in the local state
210214 jwt_cache = {
211215 jwt : data . jwt ,
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export function createAuthHandler({
7070 basePath = "/api/auth" ,
7171 ...options
7272} : CreateAuthHandlerOptions ) {
73- // re-map the server wallet to to the admin account option
73+ // re-map the server wallet to the admin account option
7474 const twAuth = createAuth ( { ...options , adminAccount : serverWallet } ) ;
7575
7676 // payload generation endpoint
You can’t perform that action at this time.
0 commit comments