Compare commits

..
Author SHA1 Message Date
Joaquim VergesGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
cf53c2d7f1 Version Packages (#8362)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 12:10:38 -08:00
Joaquim VergesandGitHub 207cb9dbeb [SDK] Enhance isMobile() detection with additional mobile signals (#8361) 2025-11-05 11:48:57 -08:00
Jonas DanielsandGitHub b4d365bdc0 Move x402 route from /payments/x402 to /x402 (#8360) 2025-11-04 16:30:08 -08:00
14 changed files with 159 additions and 83 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = [
"/wallets",
"/account-abstraction",
"/payments",
"/payments/x402",
"/x402",
"/nexus",
"/auth",
"/in-app-wallets",
+5
View File
@@ -479,6 +479,11 @@ async function redirects() {
destination: "/tokens",
permanent: false,
},
{
source: "/payments/x402",
destination: "/x402",
permanent: false,
},
];
}
+8
View File
@@ -1,5 +1,13 @@
# wagmi-inapp
## 0.0.23
### Patch Changes
- Updated dependencies [[`207cb9d`](https://github.com/thirdweb-dev/js/commit/207cb9dbeb82411809bafa2a8e833b1f10414b92)]:
- thirdweb@5.111.3
- @thirdweb-dev/wagmi-adapter@0.2.178
## 0.0.22
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "wagmi-inapp",
"private": true,
"version": "0.0.22",
"version": "0.0.23",
"type": "module",
"scripts": {
"dev": "vite",
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/nebula
## 0.2.81
### Patch Changes
- Updated dependencies [[`207cb9d`](https://github.com/thirdweb-dev/js/commit/207cb9dbeb82411809bafa2a8e833b1f10414b92)]:
- thirdweb@5.111.3
## 0.2.80
### Patch Changes
+1 -1
View File
@@ -57,5 +57,5 @@
"type": "module",
"types": "./dist/types/exports/thirdweb.d.ts",
"typings": "./dist/types/exports/thirdweb.d.ts",
"version": "0.2.80"
"version": "0.2.81"
}
+6
View File
@@ -1,5 +1,11 @@
# thirdweb
## 5.111.3
### Patch Changes
- [#8361](https://github.com/thirdweb-dev/js/pull/8361) [`207cb9d`](https://github.com/thirdweb-dev/js/commit/207cb9dbeb82411809bafa2a8e833b1f10414b92) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Add extra mobile detection for isMobile() function
## 5.111.2
### Patch Changes
+1 -1
View File
@@ -430,5 +430,5 @@
}
},
"typings": "./dist/types/exports/thirdweb.d.ts",
"version": "5.111.2"
"version": "5.111.3"
}
@@ -9,44 +9,48 @@ import { getContract } from "../contract.js";
import { deployCloneFactory } from "./utils/bootstrap.js";
describe.runIf(process.env.TW_SECRET_KEY)("deploy dynamic", () => {
it.sequential("should deploy dynamic contract with extensions", async () => {
await deployCloneFactory({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
// TODO: Fix this test
it.skip.sequential(
"should deploy dynamic contract with extensions",
async () => {
await deployCloneFactory({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
const deployed = await deployPublishedContract({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
contractId: "EvolvingNFT",
contractParams: {
contractURI: "",
defaultAdmin: TEST_ACCOUNT_A.address,
name: "Evolving nft",
royaltyBps: 0n,
royaltyRecipient: TEST_ACCOUNT_A.address,
saleRecipient: TEST_ACCOUNT_A.address,
symbol: "ENFT",
trustedForwarders: [],
},
});
const deployed = await deployPublishedContract({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
contractId: "EvolvingNFT",
contractParams: {
contractURI: "",
defaultAdmin: TEST_ACCOUNT_A.address,
name: "Evolving nft",
royaltyBps: 0n,
royaltyRecipient: TEST_ACCOUNT_A.address,
saleRecipient: TEST_ACCOUNT_A.address,
symbol: "ENFT",
trustedForwarders: [],
},
});
expect(deployed).toBeDefined();
expect(deployed).toBeDefined();
const contract = getContract({
address: deployed,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
const contract = getContract({
address: deployed,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
const extensions = await readContract({
contract,
method: resolveMethod("getAllExtensions"),
params: [],
});
const extensions = await readContract({
contract,
method: resolveMethod("getAllExtensions"),
params: [],
});
expect(extensions.length).toEqual(3);
});
expect(extensions.length).toEqual(3);
},
);
});
@@ -11,50 +11,54 @@ import { sendTransaction } from "../../../transaction/actions/send-transaction.j
import { installPublishedExtension } from "./installPublishedExtension.js";
describe.runIf(process.env.TW_SECRET_KEY)("install extension", () => {
it.sequential("should install extension to a dynamic contract", async () => {
await deployCloneFactory({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
// TODO: Fix this test
it.skip.sequential(
"should install extension to a dynamic contract",
async () => {
await deployCloneFactory({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
const deployed = await deployPublishedContract({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
contractId: "EvolvingNFT",
contractParams: {
contractURI: "",
defaultAdmin: TEST_ACCOUNT_A.address,
name: "Evolving nft",
royaltyBps: 0n,
royaltyRecipient: TEST_ACCOUNT_A.address,
saleRecipient: TEST_ACCOUNT_A.address,
symbol: "ENFT",
trustedForwarders: [],
},
});
const deployed = await deployPublishedContract({
account: TEST_ACCOUNT_A,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
contractId: "EvolvingNFT",
contractParams: {
contractURI: "",
defaultAdmin: TEST_ACCOUNT_A.address,
name: "Evolving nft",
royaltyBps: 0n,
royaltyRecipient: TEST_ACCOUNT_A.address,
saleRecipient: TEST_ACCOUNT_A.address,
symbol: "ENFT",
trustedForwarders: [],
},
});
const contract = getContract({
address: deployed,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
const contract = getContract({
address: deployed,
chain: ANVIL_CHAIN,
client: TEST_CLIENT,
});
const transaction = installPublishedExtension({
account: TEST_ACCOUNT_A,
contract,
extensionName: "DirectListingsLogic",
});
const transaction = installPublishedExtension({
account: TEST_ACCOUNT_A,
contract,
extensionName: "DirectListingsLogic",
});
await sendTransaction({ account: TEST_ACCOUNT_A, transaction });
await sendTransaction({ account: TEST_ACCOUNT_A, transaction });
const extensions = await readContract({
contract,
method: resolveMethod("getAllExtensions"),
params: [],
});
const extensions = await readContract({
contract,
method: resolveMethod("getAllExtensions"),
params: [],
});
expect(extensions.length).toEqual(4);
});
expect(extensions.length).toEqual(4);
},
);
});
@@ -11,7 +11,8 @@ import { deployPublishedContract } from "../../prebuilts/deploy-published.js";
import { uninstallExtension } from "./uninstallExtension.js";
describe.runIf(process.env.TW_SECRET_KEY)("uninstall extension", () => {
it.sequential(
// TODO: Fix this test
it.skip.sequential(
"should uninstall extension from a dynamic contract",
async () => {
await deployCloneFactory({
+41 -2
View File
@@ -30,6 +30,45 @@ function isIOS(): boolean {
/**
* @internal
*/
export function isMobile(): boolean {
return isAndroid() || isIOS();
function hasTouchScreen(): boolean {
if (typeof window === "undefined" || typeof navigator === "undefined") {
return false;
}
return (
"ontouchstart" in window ||
navigator.maxTouchPoints > 0 ||
// @ts-expect-error - msMaxTouchPoints is IE specific
navigator.msMaxTouchPoints > 0
);
}
/**
* @internal
*/
function hasMobileAPIs(): boolean {
if (typeof window === "undefined") {
return false;
}
return "orientation" in window || "onorientationchange" in window;
}
/**
* @internal
*/
export function isMobile(): boolean {
// Primary signal: OS detection via user agent
const isMobileOS = isAndroid() || isIOS();
if (isMobileOS) {
return true;
}
// Secondary signal: catch edge cases like webviews with modified user agents
// Both touch capability AND mobile-specific APIs must be present to avoid
// false positives on touch-enabled desktops
if (hasTouchScreen() && hasMobileAPIs()) {
return true;
}
return false;
}
+2
View File
@@ -1,5 +1,7 @@
# @thirdweb-dev/wagmi-adapter
## 0.2.178
## 0.2.177
## 0.2.176
+1 -1
View File
@@ -56,5 +56,5 @@
"type": "module",
"types": "./dist/types/exports/thirdweb.d.ts",
"typings": "./dist/types/exports/thirdweb.d.ts",
"version": "0.2.177"
"version": "0.2.178"
}