diff --git a/apps/marginfi-v2-ui/src/components/common/Portfolio/lending-portfolio.tsx b/apps/marginfi-v2-ui/src/components/common/Portfolio/lending-portfolio.tsx index 5804c009c..9c518ac13 100644 --- a/apps/marginfi-v2-ui/src/components/common/Portfolio/lending-portfolio.tsx +++ b/apps/marginfi-v2-ui/src/components/common/Portfolio/lending-portfolio.tsx @@ -31,6 +31,7 @@ export const LendingPortfolio = () => { const router = useRouter(); const { connected } = useWallet(); const [walletConnectionDelay, setWalletConnectionDelay] = React.useState(false); + const [isAccountSelectOpen, setIsAccountSelectOpen] = React.useState(false); const [setIsWalletOpen] = useWalletStore((state) => [state.setIsWalletOpen]); const [ @@ -62,6 +63,7 @@ export const LendingPortfolio = () => { const [rewardsDialogOpen, setRewardsDialogOpen] = React.useState(false); const [actionTxn, setActionTxn] = React.useState(null); const [rewardsLoading, setRewardsLoading] = React.useState(false); + const { handleSimulation, bankAddressesWithEmissions } = useRewardSimulation({ simulationResult: rewards, actionTxn, @@ -236,6 +238,11 @@ export const LendingPortfolio = () => { handleSwitchAccount(new PublicKey(value)); }} disabled={isSwitchingAccount} + open={isAccountSelectOpen} + onOpenChange={(open) => { + setIsAccountSelectOpen(open); + }} + value={selectedAccount?.address.toBase58()} > Account{" "} @@ -252,6 +259,7 @@ export const LendingPortfolio = () => {