fix acct loading

This commit is contained in:
tjs 2023-09-20 17:50:35 -04:00
parent 32016c233f
commit 3a714ffe19
3 changed files with 10 additions and 3 deletions

View File

@ -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'],

View File

@ -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

View File

@ -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