14.05.2026 rip
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user