Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v1.590.0 #6844

Merged
merged 11 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout release
- uses: actions/checkout@v3
uses: actions/checkout@v3
with:
ref: release
- name: Sentry Release
Expand Down
4 changes: 3 additions & 1 deletion src/assets/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,9 @@
"manageAccounts": {
"title": "Manage Accounts",
"description": "These are the chains you have connected and the number of accounts you have imported.",
"addChain": "Add another chain"
"emptyList": "You have no accounts connected yet. Add a chain to get started.",
"addChain": "Add a chain",
"addAnotherChain": "Add another chain"
},
"selectChain": {
"title": "Select Chain",
Expand Down
23 changes: 13 additions & 10 deletions src/components/Layout/Header/NavBar/Native/NativeMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
import { ChevronRightIcon, EditIcon } from '@chakra-ui/icons'
import { Button, MenuDivider, MenuItem } from '@chakra-ui/react'
import { useCallback } from 'react'
import React, { useCallback } from 'react'
import { useTranslate } from 'react-polyglot'
import { Text } from 'components/Text'
import { useFeatureFlag } from 'hooks/useFeatureFlag/useFeatureFlag'
import { useModal } from 'hooks/useModal/useModal'

const chevronRightIcon = <ChevronRightIcon />
const editIcon = <EditIcon />
type NativeMenuProps = {
onClose?: () => void
}

export const NativeMenu = () => {
export const NativeMenu: React.FC<NativeMenuProps> = ({ onClose }) => {
const translate = useTranslate()
const isAccountManagementEnabled = useFeatureFlag('AccountManagement')

const backupNativePassphrase = useModal('backupNativePassphrase')
const accountManagementPopover = useModal('manageAccounts')

const handleBackupMenuItemClick = useCallback(
() => backupNativePassphrase.open({}),
[backupNativePassphrase],
)
const handleBackupMenuItemClick = useCallback(() => {
onClose && onClose()
backupNativePassphrase.open({})
}, [backupNativePassphrase, onClose])

const handleManageAccountsMenuItemClick = useCallback(
() => accountManagementPopover.open({}),
[accountManagementPopover],
)
const handleManageAccountsMenuItemClick = useCallback(() => {
onClose && onClose()
accountManagementPopover.open({})
}, [accountManagementPopover, onClose])

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Header/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type NavBarProps = {
const flex = { base: 'none', md: '1 1 0%' }

export const NavBar = (props: NavBarProps) => {
const { isCompact, onClick, ...stackProps } = useMemo(() => {
const { isCompact, onClick, stackProps } = useMemo(() => {
const { isCompact, onClick, ...stackProps } = props
return { isCompact, onClick, stackProps }
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down
3 changes: 3 additions & 0 deletions src/components/Layout/Header/NavBar/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const NoWallet = ({ onClick }: { onClick: () => void }) => {
export type WalletConnectedProps = {
onDisconnect: () => void
onSwitchProvider: () => void
onClose?: () => void
} & Pick<InitialState, 'walletInfo' | 'isConnected' | 'connectedType'>

export const WalletConnected = (props: WalletConnectedProps) => {
Expand All @@ -60,6 +61,7 @@ export const WalletConnected = (props: WalletConnectedProps) => {
onDisconnect={props.onDisconnect}
onSwitchProvider={props.onSwitchProvider}
connectedType={props.connectedType}
onClose={props.onClose}
/>
</MemoryRouter>
)
Expand Down Expand Up @@ -191,6 +193,7 @@ export const UserMenu: React.FC<{ onClick?: () => void }> = memo(({ onClick }) =
onDisconnect={disconnect}
onSwitchProvider={handleConnect}
connectedType={connectedType}
onClose={onClick}
/>
) : (
<NoWallet onClick={handleConnect} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const ConnectedMenu = memo(
walletInfo,
onDisconnect,
onSwitchProvider,
onClose,
}: WalletConnectedProps & {
connectedWalletMenuRoutes: boolean
}) => {
Expand Down Expand Up @@ -74,7 +75,7 @@ const ConnectedMenu = memo(
{translate('connectWallet.menu.connecting')}
</MenuItem>
)}
{ConnectMenuComponent && <ConnectMenuComponent />}
{ConnectMenuComponent && <ConnectMenuComponent onClose={onClose} />}
<MenuDivider />
<MenuItem icon={repeatIcon} onClick={onSwitchProvider}>
{translate('connectWallet.menu.switchWallet')}
Expand All @@ -94,6 +95,7 @@ export const WalletConnectedMenu = ({
walletInfo,
isConnected,
connectedType,
onClose,
}: WalletConnectedProps) => {
const location = useLocation()

Expand Down Expand Up @@ -128,6 +130,7 @@ export const WalletConnectedMenu = ({
walletInfo={walletInfo}
onDisconnect={onDisconnect}
onSwitchProvider={onSwitchProvider}
onClose={onClose}
/>
</SubMenuContainer>
</Route>
Expand Down
Loading
Loading