14.05.2026 rip

This commit is contained in:
2026-05-14 16:32:13 +03:00
parent 9c3fbbdc4b
commit 4913765584
9 changed files with 407 additions and 119 deletions

View File

@@ -1,5 +1,5 @@
import { useQuery, useQueries } from '@tanstack/react-query'
import { getWalletBalance, getPrices, CHAINS } from '../api/walletApi'
import { useQuery, useQueries, useMutation } from '@tanstack/react-query'
import { getWalletBalance, getPrices, sendWallet, CHAINS, type Chain, type SendWalletPayload } from '../api/walletApi'
export function useAllWalletBalances() {
return useQueries({
@@ -18,3 +18,10 @@ export function usePrices(symbols: string[]) {
staleTime: 5 * 60 * 1000,
})
}
export function useSendWallet() {
return useMutation({
mutationFn: ({ chain, ...payload }: { chain: Chain } & SendWalletPayload) =>
sendWallet(chain, payload),
})
}