14.05.2026 rip

This commit is contained in:
2026-05-14 21:42:16 +03:00
parent c2a1ca3ee5
commit c1472d5363
5 changed files with 110 additions and 13 deletions

View File

@@ -151,3 +151,39 @@ export async function getPortfolio(): Promise<PortfolioData> {
const res = await walletGet<{ success: boolean; data: PortfolioData }>('/api/wallets/portfolio')
return res.data
}
export interface TokenInfo {
chain: string
symbol: string
name: string
contract: string | null
}
export interface RelayQuotePayload {
user: string
recipient: string
originChainId: number
destinationChainId: number
originCurrency: string
destinationCurrency: string
amount: string
tradeType: 'EXACT_INPUT'
}
export interface RelayQuoteResponse {
details: {
currencyOut: {
amountFormatted: string
amountUsd: string
}
}
}
export async function getTokensList(): Promise<TokenInfo[]> {
const res = await walletGet<{ success: boolean; data: TokenInfo[] }>('/api/tokens')
return res.data
}
export async function getRelayQuote(payload: RelayQuotePayload): Promise<RelayQuoteResponse> {
return walletPost<RelayQuoteResponse>('/api/relay/quote', payload)
}