close settings modal after account close

This commit is contained in:
saml33 2023-11-21 22:22:29 +11:00
parent cb5d8d486d
commit ef201f0f83
2 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,7 @@ const CreateAccountForm = ({
}
return loading ? (
<div className="flex h-full flex-col items-center justify-between">
<div className="flex flex-1 flex-col items-center justify-center">
<BounceLoader loadingMessage={t('creating-account')} />
</div>
) : (

View File

@ -15,11 +15,13 @@ import { ExclamationCircleIcon, TrashIcon } from '@heroicons/react/20/solid'
import useUnsettledPerpPositions from 'hooks/useUnsettledPerpPositions'
import { getMultipleAccounts } from '@project-serum/anchor/dist/cjs/utils/rpc'
import { formatCurrencyValue } from 'utils/numbers'
import TopBarStore from '@store/topBarStore'
const CloseAccountModal = ({ isOpen, onClose }: ModalProps) => {
const { t } = useTranslation(['close-account'])
const [loading, setLoading] = useState(false)
const set = mangoStore((s) => s.set)
const { setShowSettingsModal } = TopBarStore()
const openOrders = Object.values(mangoStore((s) => s.mangoAccount.openOrders))
const connection = mangoStore.getState().connection
const hasOpenOrders =
@ -61,6 +63,7 @@ const CloseAccountModal = ({ isOpen, onClose }: ModalProps) => {
setLoading(false)
onClose()
setShowSettingsModal(false)
notify({
title: t('account-closed'),
type: 'success',