14.05.2026 rip

This commit is contained in:
2026-05-14 20:05:35 +03:00
parent 2de30fbde6
commit fcfdac87b4
6 changed files with 150 additions and 5 deletions

View File

@@ -1,6 +1,14 @@
import { useQuery, useQueries, useMutation } from '@tanstack/react-query'
import { getWalletBalance, getPrices, sendWallet, getWalletAddresses, CHAINS, type Chain, type SendWalletPayload } from '../api/walletApi'
export function useWalletBalance(chain: Chain) {
return useQuery({
queryKey: ['wallet', 'balance', chain],
queryFn: () => getWalletBalance(chain),
staleTime: 30_000,
})
}
export function useAllWalletBalances() {
return useQueries({
queries: CHAINS.map(chain => ({