Skip to content

Commit

Permalink
Ref proigram type updates (#1136)
Browse files Browse the repository at this point in the history
* Ref proigram type updates

* Fix

---------

Co-authored-by: Marek Epicode <m.sadura@outlook.com>
  • Loading branch information
0xepicode and msadura authored Dec 17, 2024
1 parent 9b78e91 commit e55d825
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-ads-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@swapkit/api": patch
---

Update types for referral program
6 changes: 6 additions & 0 deletions packages/swapkit/api/src/swapkitApi/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit e55d825

Please sign in to comment.