Skip to content

Conversation

@heyllog
Copy link
Contributor

@heyllog heyllog commented Jan 14, 2026

No description provided.

@heyllog heyllog self-assigned this Jan 14, 2026
@vercel
Copy link

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
kit-demo-wallet Ready Ready Preview, Comment Jan 23, 2026 5:34am

Request Review

@heyllog heyllog marked this pull request as ready for review January 16, 2026 16:19
@heyllog heyllog requested a review from a team as a code owner January 16, 2026 16:20
/**
* Base parameters for requesting a swap quote
*/
interface SwapQuoteParamsBase<TProviderOptions = unknown> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heyllog @TrueCarry
Correct me if I'm wrong but we are probably would need all models related to Swap it api/models layer, so we could use them in iOS/Android SDK also
If so the they should be moved there and probably simplified (e.g. no generics or classes) so we could generate them

fromToken: UserFriendlyAddress | 'TON';
toToken: UserFriendlyAddress | 'TON';
fromAmount: string;
toAmount: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heyllog Shouldn't we use TokenAmount type here?

*/
export interface SwapQuote {
fromToken: UserFriendlyAddress | 'TON';
toToken: UserFriendlyAddress | 'TON';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heyllog I remember I saw such hack in jettons api caching. Maybe we could find a better way to do it? I understand purposes and logic but it's quite frustrating.

Copy link
Contributor

@ProudOfZiggy ProudOfZiggy Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'll be better to represent it same as with do with similar types

export type SwapToken =
    | { type: 'jetton'; value: UserFriendlyAddress }
    | { type: 'ton'}

...

fromToken: SwapToken;

This also will solve problems with reusing models with mobile SDKs

Copy link
Contributor

@ProudOfZiggy ProudOfZiggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to discuss how we will handle those models according to our current api layer, so we could support those models on all platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants