mars-v2-frontend/src/hooks/useWalletBalances.tsx
Yusuf Seyrek 2c399a2f16
feat: lend and withdraw modals (#257)
* feat: lend/withdraw functionality

* feat: addressed to pr discussions

* rename: data hook members
2023-06-23 13:30:08 +03:00

11 lines
296 B
TypeScript

import useSWR from 'swr'
import getWalletBalances from 'api/wallets/getWalletBalances'
export default function useWalletBalances(address?: string) {
return useSWR(`walletBalances${address}`, () => getWalletBalances(address || ''), {
isPaused: () => !address,
fallbackData: [],
})
}