14.05.2026 rip
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user