File tree 2 files changed +6
-2
lines changed
packages/thirdweb/src/login
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
import type { Chain } from "../../chains/types.js" ;
2
2
import type { ThirdwebClient } from "../../client/client.js" ;
3
3
import type { PreparedTransaction } from "../../transaction/prepare-transaction.js" ;
4
+ import { getAddress } from "../../utils/address.js" ;
4
5
import type { AsyncStorage } from "../../utils/storage/AsyncStorage.js" ;
5
6
import { inAppWallet } from "../../wallets/in-app/web/in-app.js" ;
6
7
import type { Account , Wallet } from "../../wallets/interfaces/wallet.js" ;
@@ -205,7 +206,10 @@ function mapAccount(
205
206
: undefined ,
206
207
} ) ;
207
208
// 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
+ ) {
209
213
// set the JWT in the local state
210
214
jwt_cache = {
211
215
jwt : data . jwt ,
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export function createAuthHandler({
70
70
basePath = "/api/auth" ,
71
71
...options
72
72
} : CreateAuthHandlerOptions ) {
73
- // re-map the server wallet to to the admin account option
73
+ // re-map the server wallet to the admin account option
74
74
const twAuth = createAuth ( { ...options , adminAccount : serverWallet } ) ;
75
75
76
76
// payload generation endpoint
You can’t perform that action at this time.
0 commit comments