fix(trading): hide transfer button in view as mode (#3189)
This commit is contained in:
parent
613cce3683
commit
101ae00a57
@ -145,7 +145,8 @@ export const VegaWalletConnectButton = () => {
|
||||
(store) => store.openVegaWalletDialog
|
||||
);
|
||||
const openTransferDialog = useTransferDialog((store) => store.open);
|
||||
const { pubKey, pubKeys, selectPubKey, disconnect } = useVegaWallet();
|
||||
const { pubKey, pubKeys, selectPubKey, disconnect, isReadOnly } =
|
||||
useVegaWallet();
|
||||
const isConnected = pubKey !== null;
|
||||
|
||||
const activeKey = useMemo(() => {
|
||||
@ -186,12 +187,14 @@ export const VegaWalletConnectButton = () => {
|
||||
))}
|
||||
</DropdownMenuRadioGroup>
|
||||
<DropdownMenuSeparator />
|
||||
{!isReadOnly && (
|
||||
<DropdownMenuItem
|
||||
data-testid="wallet-transfer"
|
||||
onClick={() => openTransferDialog(true)}
|
||||
>
|
||||
{t('Transfer')}
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
<DropdownMenuItem data-testid="disconnect" onClick={disconnect}>
|
||||
{t('Disconnect')}
|
||||
</DropdownMenuItem>
|
||||
|
Loading…
Reference in New Issue
Block a user