2023-09-19 13:39:14 +00:00
|
|
|
import useSWR from 'swr'
|
|
|
|
|
|
|
|
import getAccountIds from 'api/wallets/getAccountIds'
|
|
|
|
|
2023-10-13 11:49:38 +00:00
|
|
|
export default function useAccountIds(address?: string, suspense = true) {
|
2023-09-19 13:39:14 +00:00
|
|
|
return useSWR(`wallets/${address}/account-ids`, () => getAccountIds(address), {
|
2023-10-13 11:49:38 +00:00
|
|
|
suspense: suspense,
|
2023-09-24 10:29:49 +00:00
|
|
|
fallback: [] as string[],
|
2023-09-19 13:39:14 +00:00
|
|
|
revalidateOnFocus: false,
|
|
|
|
})
|
|
|
|
}
|