14.05.2026 rip

This commit is contained in:
2026-05-14 21:23:27 +03:00
parent 1e5f792854
commit c2a1ca3ee5
4 changed files with 50 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import { useQuery, useQueries, useMutation } from '@tanstack/react-query'
import { getWalletBalance, getPrices, sendWallet, getWalletAddresses, CHAINS, type Chain, type SendWalletPayload } from '../api/walletApi'
import { getWalletBalance, getPrices, sendWallet, getWalletAddresses, getPortfolio, CHAINS, type Chain, type SendWalletPayload } from '../api/walletApi'
export function useWalletBalance(chain: Chain) {
return useQuery({
@@ -41,3 +41,11 @@ export function useWalletAddresses() {
staleTime: 10 * 60 * 1000,
})
}
export function usePortfolio() {
return useQuery({
queryKey: ['wallet', 'portfolio'],
queryFn: getPortfolio,
staleTime: 30_000,
})
}