thirdweb 5.112.2 → 5.112.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- export declare const version = "5.112.2";
1
+ export declare const version = "5.112.3";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"siwe.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/core/authentication/siwe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEtE;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAiD/C"}
1
+ {"version":3,"file":"siwe.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/core/authentication/siwe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAKtE;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAmD/C"}
package/package.json CHANGED
@@ -39,8 +39,8 @@
39
39
  "viem": "2.39.0",
40
40
  "x402": "0.7.0",
41
41
  "zod": "3.25.75",
42
- "@thirdweb-dev/engine": "3.4.0",
43
- "@thirdweb-dev/insight": "1.1.1"
42
+ "@thirdweb-dev/insight": "1.1.1",
43
+ "@thirdweb-dev/engine": "3.4.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@aws-sdk/client-kms": "3.592.0",
@@ -399,7 +399,7 @@
399
399
  }
400
400
  },
401
401
  "typings": "./dist/types/exports/thirdweb.d.ts",
402
- "version": "5.112.2",
402
+ "version": "5.112.3",
403
403
  "scripts": {
404
404
  "bench": "vitest -c ./test/vitest.config.ts bench",
405
405
  "bench:compare": "bun run ./benchmarks/run.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.112.2";
1
+ export const version = "5.112.3";
@@ -10,6 +10,9 @@ import type { Ecosystem } from "../wallet/types.js";
10
10
  import { getLoginCallbackUrl, getLoginUrl } from "./getLoginPath.js";
11
11
  import type { AuthStoredTokenWithCookieReturnType } from "./types.js";
12
12
 
13
+ // wallets that cannot sign with ethereum mainnet, require a specific chain always
14
+ const NON_ETHEREUM_WALLETS = ["xyz.abs"];
15
+
13
16
  /**
14
17
  * @internal
15
18
  */
@@ -20,8 +23,10 @@ export async function siweAuthenticate(args: {
20
23
  ecosystem?: Ecosystem;
21
24
  }): Promise<AuthStoredTokenWithCookieReturnType> {
22
25
  const { wallet, client, ecosystem, chain } = args;
23
- const siweChain = chain || getCachedChain(1); // fallback to mainnet for SIWE for wide wallet compatibility
24
- // only connect if the wallet doesn't already have an account
26
+ const siweChain = NON_ETHEREUM_WALLETS.includes(wallet.id)
27
+ ? chain || getCachedChain(1)
28
+ : getCachedChain(1); // fallback to mainnet for SIWE for wide wallet compatibility
29
+ // only connect if the wallet doesn't alnready have an account
25
30
  const account =
26
31
  wallet.getAccount() || (await wallet.connect({ chain: siweChain, client }));
27
32
  const clientFetch = getClientFetch(client, ecosystem);