fix acct loading
This commit is contained in:
parent
32016c233f
commit
3a714ffe19
|
@ -34,6 +34,7 @@ const fetchHistory = async (
|
|||
|
||||
export default function useAccountHistory() {
|
||||
const { mangoAccount } = useMangoAccount()
|
||||
console.log('mango account in history', mangoAccount)
|
||||
|
||||
const response = useQuery<Array<ActivityFeed> | EmptyObject | null>(
|
||||
['history'],
|
||||
|
|
|
@ -24,9 +24,15 @@ const Index: NextPage = () => {
|
|||
useEffect(() => {
|
||||
const mangoAccounts = mangoStore.getState().mangoAccounts
|
||||
const selectedMangoAccount = mangoAccounts.find(
|
||||
(ma) => ma.name === `${BOOST_ACCOUNT_PREFIX}${selectedToken}`,
|
||||
(ma) =>
|
||||
ma.name.toLowerCase() ===
|
||||
`${(BOOST_ACCOUNT_PREFIX + selectedToken).toLowerCase()}`,
|
||||
)
|
||||
console.log(
|
||||
'selectedMangoAccount',
|
||||
(BOOST_ACCOUNT_PREFIX + selectedToken).toLowerCase(),
|
||||
selectedMangoAccount,
|
||||
)
|
||||
console.log('selectedMangoAccount', selectedMangoAccount)
|
||||
|
||||
set((s) => {
|
||||
s.mangoAccount.current = selectedMangoAccount
|
||||
|
|
|
@ -8,7 +8,7 @@ export const SHOW_INACTIVE_POSITIONS_KEY = 'showInactivePositions-0.1'
|
|||
|
||||
export const LAST_ACCOUNT_KEY = 'mangoAccount-0.4'
|
||||
|
||||
export const BOOST_ACCOUNT_PREFIX = 'Leverage Stake'
|
||||
export const BOOST_ACCOUNT_PREFIX = 'Leverage Stake '
|
||||
|
||||
export const CLIENT_TX_TIMEOUT = 90000
|
||||
|
||||
|
|
Loading…
Reference in New Issue