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