From e55d8250716e7ed0658d5451ee97513c34df9984 Mon Sep 17 00:00:00 2001 From: 0xEpicode <100600187+0xepicode@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:24:02 +0100 Subject: [PATCH] Ref proigram type updates (#1136) * Ref proigram type updates * Fix --------- Co-authored-by: Marek Epicode --- .changeset/two-ads-dance.md | 5 +++++ packages/swapkit/api/src/swapkitApi/types.ts | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/two-ads-dance.md diff --git a/.changeset/two-ads-dance.md b/.changeset/two-ads-dance.md new file mode 100644 index 000000000..3a013547d --- /dev/null +++ b/.changeset/two-ads-dance.md @@ -0,0 +1,5 @@ +--- +"@swapkit/api": patch +--- + +Update types for referral program diff --git a/packages/swapkit/api/src/swapkitApi/types.ts b/packages/swapkit/api/src/swapkitApi/types.ts index 65d6aab25..0975d99d7 100644 --- a/packages/swapkit/api/src/swapkitApi/types.ts +++ b/packages/swapkit/api/src/swapkitApi/types.ts @@ -273,6 +273,11 @@ export const QuoteRequestSchema = z description: "Set to true to enable CF boost to speed up Chainflip swaps. BTC only.", }), ), + referrer: z.optional( + z.string({ + description: "Referrer address (referral program)", + }), + ), }) .refine((data) => data.sellAsset !== data.buyAsset, { message: "Must be different", @@ -654,6 +659,7 @@ export const RouteQuoteMetadataSchema = z.object({ txType: z.optional(z.nativeEnum(RouteQuoteTxType)), chainflip: z.optional(ChainflipMetadataSchema), + referrer: z.optional(z.string()), }); export const RouteQuoteWarningSchema = z.array(