14.05.2026 rip

This commit is contained in:
2026-05-14 22:39:06 +03:00
parent 0668ecccf3
commit cdbd9318cf
7 changed files with 81 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
import { useQuery, useQueries, useMutation } from '@tanstack/react-query'
import { getWalletBalance, getPrices, sendWallet, getWalletAddresses, getPortfolio, getTokensList, getRelayQuote, CHAINS, type Chain, type SendWalletPayload, type RelayQuotePayload } from '../api/walletApi'
import { getWalletBalance, getPrices, sendWallet, getWalletAddresses, getPortfolio, getTokensList, getRelayQuote, createWallet, revealMnemonic, CHAINS, type Chain, type SendWalletPayload, type RelayQuotePayload } from '../api/walletApi'
export function useWalletBalance(chain: Chain) {
return useQuery({
@@ -58,6 +58,19 @@ export function useTokensList() {
})
}
export function useCreateWallet() {
return useMutation({ mutationFn: createWallet })
}
export function useRevealMnemonic() {
return useQuery({
queryKey: ['wallet', 'mnemonic'],
queryFn: revealMnemonic,
staleTime: Infinity,
retry: false,
})
}
export function useRelayQuote(payload: RelayQuotePayload | null) {
return useQuery({
queryKey: ['relay', 'quote',