Skip to content

Commit

Permalink
fix(wallet): remove change wallet feature (#5136)
Browse files Browse the repository at this point in the history
* fix(wallet): remove change wallet feature

* fix: hide disconnect button in Safe
  • Loading branch information
shoom3301 authored Dec 2, 2024
1 parent 91bab8d commit 329c1df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { AccountDetails } from './index'
const defaultProps = {
pendingTransactions: [],
confirmedTransactions: [],
toggleWalletModal: () => void 0,
toggleAccountSelectorModal: () => void 0,
handleCloseOrdersPanel: () => void 0,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { getEtherscanLink, getExplorerLabel, shortenAddress, getExplorerAddressL
import { Command } from '@cowprotocol/types'
import { ExternalLink } from '@cowprotocol/ui'
import {
ConnectionType,
useWalletInfo,
useWalletDetails,
useIsWalletConnect,
getIsHardWareWallet,
useDisconnectWallet,
useConnectionType,
getIsInjectedMobileBrowser,
ConnectionType,
} from '@cowprotocol/wallet'

import { Trans } from '@lingui/macro'
Expand Down Expand Up @@ -75,7 +75,6 @@ export interface AccountDetailsProps {
confirmedTransactions: string[]
ENSName?: string
forceHardwareWallet?: boolean
toggleWalletModal: Command
toggleAccountSelectorModal: Command
handleCloseOrdersPanel: Command
}
Expand All @@ -84,7 +83,6 @@ export function AccountDetails({
pendingTransactions = [],
confirmedTransactions = [],
ENSName,
toggleWalletModal,
toggleAccountSelectorModal,
handleCloseOrdersPanel,
forceHardwareWallet,
Expand Down Expand Up @@ -179,17 +177,10 @@ export function AccountDetails({
</AddressLink>
)}

{standaloneMode !== false && (
<>
{connectionType !== ConnectionType.GNOSIS_SAFE && (
<WalletAction onClick={toggleWalletModal}>
<Trans>Change Wallet</Trans>
</WalletAction>
)}
<WalletAction onClick={handleDisconnectClick}>
<Trans>Disconnect</Trans>
</WalletAction>
</>
{standaloneMode !== false && connectionType !== ConnectionType.GNOSIS_SAFE && (
<WalletAction onClick={handleDisconnectClick}>
<Trans>Disconnect</Trans>
</WalletAction>
)}
</>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { useWalletDetails, useWalletInfo } from '@cowprotocol/wallet'
import { transparentize } from 'color2k'
import styled from 'styled-components/macro'

import { useToggleWalletModal } from 'legacy/state/application/hooks'

import { toggleAccountSelectorModalAtom } from 'modules/wallet/containers/AccountSelectorModal/state'

import { useCategorizeRecentActivity } from 'common/hooks/useCategorizeRecentActivity'
Expand Down Expand Up @@ -136,7 +134,6 @@ const Wrapper = styled.div`
export function OrdersPanel() {
const { active, account } = useWalletInfo()
const { ensName } = useWalletDetails()
const toggleWalletModal = useToggleWalletModal()
const toggleAccountSelectorModal = useSetAtom(toggleAccountSelectorModalAtom)
const { isOpen } = useAccountModalState()
const { pendingActivity, confirmedActivity } = useCategorizeRecentActivity()
Expand All @@ -163,7 +160,6 @@ export function OrdersPanel() {
ENSName={ensName}
pendingTransactions={pendingActivity}
confirmedTransactions={confirmedActivity}
toggleWalletModal={toggleWalletModal}
toggleAccountSelectorModal={toggleAccountSelectorModal}
handleCloseOrdersPanel={handleCloseOrdersPanel}
/>
Expand Down

0 comments on commit 329c1df

Please sign in to comment.