diff --git a/hooks/useAccountHistory.ts b/hooks/useAccountHistory.ts index b9021d1..3765f02 100644 --- a/hooks/useAccountHistory.ts +++ b/hooks/useAccountHistory.ts @@ -34,6 +34,7 @@ const fetchHistory = async ( export default function useAccountHistory() { const { mangoAccount } = useMangoAccount() + console.log('mango account in history', mangoAccount) const response = useQuery | EmptyObject | null>( ['history'], diff --git a/pages/index.tsx b/pages/index.tsx index c83acc9..0b802d5 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -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 diff --git a/utils/constants.ts b/utils/constants.ts index 0353609..8c7dd96 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -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