Skip to content

Commit

Permalink
fix: Add quai acc modal closing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKostroma authored and rileystephens28 committed Jul 23, 2024
1 parent 0fa83dd commit c71afd8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ export default function AccountsNotificationPanelAccounts({
<WalletTypeHeader
accountType={accountType}
walletNumber={idx + 1}
path={accountTotalsBySignerId[0].path}
accountSigner={accountTotalsBySignerId[0].accountSigner}
signerId={accountTotalsBySignerId[0].signerId}
setZone={handleSetZone}
Expand Down
15 changes: 7 additions & 8 deletions ui/components/AccountsNotificationPanel/WalletTypeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,20 @@ export default function WalletTypeHeader({
accountSigner: AccountSigner
signerId?: string | null
walletNumber?: number
path?: string | null
setZone: (zone: Zone) => void
addAddressSelected: boolean
updateCustomOrder: (address: string[], signerId: string) => void
updateUseCustomOrder: (useOrder: boolean, signerId: string) => void
setSelectedAccountSigner: (signerId: string) => void
}) {
const { t } = useTranslation()

const areKeyringsUnlocked = useAreKeyringsUnlocked(false)
const history = useHistory()
const [showEditMenu, setShowEditMenu] = useState(false)
const [showZoneMenu, setShowZoneMenu] = useState(false)
const isWalletExists = useBackgroundSelector(selectIsWalletExists)

const walletTypeDetails: { [key in AccountType]: WalletTypeInfo } = {
[AccountType.ReadOnly]: {
title: t("accounts.notificationPanel.readOnly"),
Expand Down Expand Up @@ -102,7 +108,6 @@ export default function WalletTypeHeader({

const handleZoneSelection = (selectedZone: Zone) => {
setZone(selectedZone as Zone)
dispatch(setShowingAddAccountModal(false))
}

useEffect(() => {
Expand Down Expand Up @@ -138,12 +143,6 @@ export default function WalletTypeHeader({
return `${title} ${walletNumber}`
}, [accountType, title, sectionCustomName, walletNumber])

const history = useHistory()
const areKeyringsUnlocked = useAreKeyringsUnlocked(false)
const [showEditMenu, setShowEditMenu] = useState(false)
const [showZoneMenu, setShowZoneMenu] = useState(false)
const isWalletExists = useBackgroundSelector(selectIsWalletExists)

return (
<>
{accountSigner.type !== AccountType.ReadOnly && (
Expand Down
4 changes: 2 additions & 2 deletions ui/components/Shared/SharedDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function SharedDrawer({
className={classNames("drawer-wrapper", {
dark: isDark,
closed: !isOpen,
fillAvailable: fillAvailable,
fillAvailable,
})}
style={
{
Expand Down Expand Up @@ -87,7 +87,7 @@ export default function SharedDrawer({
</div>
<div
className={classNames("drawer-body", {
fillAvailable: fillAvailable,
fillAvailable,
})}
>
{displayChildren}
Expand Down

0 comments on commit c71afd8

Please sign in to comment.