From efab13a80a1e2365292880b630ac215cd20884ba Mon Sep 17 00:00:00 2001 From: Samuel Tinnerholm Date: Thu, 18 Jun 2026 06:34:36 +0000 Subject: [PATCH 1/2] fix(ts-sdk): register Limitless cancel typed-data routes --- sdks/typescript/pmxt/hosted-typed-data.ts | 16 ++++++++++++++++ .../tests/hosted-typed-data-routes.test.ts | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 sdks/typescript/tests/hosted-typed-data-routes.test.ts diff --git a/sdks/typescript/pmxt/hosted-typed-data.ts b/sdks/typescript/pmxt/hosted-typed-data.ts index 55bafa71..4b62963e 100644 --- a/sdks/typescript/pmxt/hosted-typed-data.ts +++ b/sdks/typescript/pmxt/hosted-typed-data.ts @@ -140,6 +140,8 @@ export type HostedRoute = | "opinion_sell_polygon" | "opinion_sell_bsc_pull" | "cancel_polymarket" + | "cancel_limitless_polygon" + | "cancel_limitless_base_pull" | "cancel_opinion_polygon" | "cancel_opinion_bsc_pull"; @@ -207,6 +209,20 @@ const SCHEMAS: Readonly> = { messageKeys: messageKeysFromFields(CANCEL_ORDER_FIELDS), walletField: "user", }, + cancel_limitless_polygon: { + primaryType: "CancelOrder", + domain: PREFUNDED_DOMAIN, + fields: CANCEL_ORDER_FIELDS, + messageKeys: messageKeysFromFields(CANCEL_ORDER_FIELDS), + walletField: "user", + }, + cancel_limitless_base_pull: { + primaryType: "CancelPull", + domain: LIMITLESS_VENUE_DOMAIN, + fields: CANCEL_PULL_FIELDS, + messageKeys: messageKeysFromFields(CANCEL_PULL_FIELDS), + walletField: "user", + }, cancel_opinion_polygon: { primaryType: "CancelOrder", domain: PREFUNDED_DOMAIN, diff --git a/sdks/typescript/tests/hosted-typed-data-routes.test.ts b/sdks/typescript/tests/hosted-typed-data-routes.test.ts new file mode 100644 index 00000000..897afb05 --- /dev/null +++ b/sdks/typescript/tests/hosted-typed-data-routes.test.ts @@ -0,0 +1,10 @@ +import { validateEconomics } from "../pmxt/hosted-typed-data"; + +describe("hosted typed-data route registry", () => { + it.each([ + "cancel_limitless_polygon", + "cancel_limitless_base_pull", + ])("recognizes %s as a cancel route", (route) => { + expect(() => validateEconomics({ message: {} } as any, route, {}, {})).not.toThrow(); + }); +}); From 8da7171e198de22c07a81cc9c16c7e194a5ecde2 Mon Sep 17 00:00:00 2001 From: Samuel Tinnerholm Date: Thu, 18 Jun 2026 06:38:13 +0000 Subject: [PATCH 2/2] fix(ts-sdk): validate Limitless typed-data economics --- sdks/typescript/pmxt/hosted-typed-data.ts | 5 ++++- .../tests/hosted-typed-data-routes.test.ts | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/sdks/typescript/pmxt/hosted-typed-data.ts b/sdks/typescript/pmxt/hosted-typed-data.ts index 4b62963e..e9c3f872 100644 --- a/sdks/typescript/pmxt/hosted-typed-data.ts +++ b/sdks/typescript/pmxt/hosted-typed-data.ts @@ -423,7 +423,10 @@ export function validateEconomics( } else if ( route === "opinion_buy" || route === "opinion_sell_polygon" || - route === "opinion_sell_bsc_pull" + route === "opinion_sell_bsc_pull" || + route === "limitless_buy" || + route === "limitless_sell_polygon" || + route === "limitless_sell_base_pull" ) { validateOpinionMarketId(message, buildResponse); } diff --git a/sdks/typescript/tests/hosted-typed-data-routes.test.ts b/sdks/typescript/tests/hosted-typed-data-routes.test.ts index 897afb05..2445e65f 100644 --- a/sdks/typescript/tests/hosted-typed-data-routes.test.ts +++ b/sdks/typescript/tests/hosted-typed-data-routes.test.ts @@ -1,5 +1,11 @@ import { validateEconomics } from "../pmxt/hosted-typed-data"; +const LIMITLESS_ORDER_ROUTES = [ + "limitless_buy", + "limitless_sell_polygon", + "limitless_sell_base_pull", +]; + describe("hosted typed-data route registry", () => { it.each([ "cancel_limitless_polygon", @@ -7,4 +13,15 @@ describe("hosted typed-data route registry", () => { ])("recognizes %s as a cancel route", (route) => { expect(() => validateEconomics({ message: {} } as any, route, {}, {})).not.toThrow(); }); + + it.each(LIMITLESS_ORDER_ROUTES)("validates tokenId economics for %s", (route) => { + expect(() => + validateEconomics( + { message: { tokenId: "actual-token" } } as any, + route, + {}, + { resolved: { token_id: "expected-token" } }, + ), + ).toThrow(/tokenId expected expected-token got actual-token/); + }); });