add redirects

This commit is contained in:
2026-05-28 20:24:56 +03:00
parent 2e6ed487fd
commit 2026230ff6
10 changed files with 506 additions and 168 deletions

View File

@@ -1,5 +1,5 @@
import { useQuery, useQueries, useMutation } from '@tanstack/react-query'
import { getWalletBalance, getPrices, sendWallet, getWalletAddresses, getPortfolio, getTokensList, getRelayQuote, executeRelaySwap, signRawEvmTx, signSolTx, getTrxSwapQuote, executeTrxSwap, createWallet, revealMnemonic, CHAINS, type Chain, type SendWalletPayload, type RelayQuotePayload, type RelaySwapStep, type TrxSwapQuotePayload } from '../api/walletApi'
import { getWalletBalance, getPrices, sendWallet, getWalletAddresses, getPortfolio, getTokensList, getRelayQuote, executeRelaySwap, signRawEvmTx, signSolTx, getTrxSwapQuote, executeTrxSwap, getJumperTokens, getJumperQuote, executeBridge, createWallet, revealMnemonic, CHAINS, type Chain, type SendWalletPayload, type RelayQuotePayload, type RelaySwapStep, type TrxSwapQuotePayload, type JumperQuotePayload, type BridgeExecutePayload } from '../api/walletApi'
export function useWalletBalance(chain: Chain) {
return useQuery({
@@ -58,6 +58,22 @@ export function useTokensList() {
})
}
export function useJumperTokens() {
return useQuery({
queryKey: ['wallet', 'jumper', 'tokens'],
queryFn: getJumperTokens,
staleTime: 10 * 60 * 1000,
})
}
export function useFetchJumperQuote() {
return useMutation({ mutationFn: (payload: JumperQuotePayload) => getJumperQuote(payload) })
}
export function useExecuteBridge() {
return useMutation({ mutationFn: (payload: BridgeExecutePayload) => executeBridge(payload) })
}
export function useCreateWallet() {
return useMutation({ mutationFn: createWallet })
}