2022-08-26 12:15:50 -07:00
|
|
|
import { MangoAccount } from '@blockworks-foundation/mango-v4'
|
2022-09-12 08:53:57 -07:00
|
|
|
import mangoStore from '@store/mangoStore'
|
2022-08-26 12:15:50 -07:00
|
|
|
|
|
|
|
export default function useMangoAccount(): {
|
|
|
|
mangoAccount: MangoAccount | undefined
|
|
|
|
initialLoad: boolean
|
|
|
|
} {
|
2022-11-19 17:40:06 -08:00
|
|
|
const mangoAccount = mangoStore((s) => s.mangoAccount.current)
|
|
|
|
const initialLoad = mangoStore((s) => s.mangoAccount.initialLoad)
|
2022-08-26 12:15:50 -07:00
|
|
|
|
2022-11-19 17:40:06 -08:00
|
|
|
return { mangoAccount, initialLoad }
|
2022-08-26 12:15:50 -07:00
|
|
|
}
|