Skip to content

Commit cc515c4

Browse files
committed
chore: disable buttons for solana
1 parent 57eb3b4 commit cc515c4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ui/components/app/wallet-overview/coin-buttons.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import {
5252
getMemoizedUnapprovedTemplatedConfirmations,
5353
///: END:ONLY_INCLUDE_IF
5454
getNetworkConfigurationIdByChainId,
55+
isSolanaAccount,
5556
} from '../../../selectors';
5657
import Tooltip from '../../ui/tooltip';
5758
///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
@@ -170,6 +171,9 @@ const CoinButtons = ({
170171

171172
const isExternalServicesEnabled = useSelector(getUseExternalServices);
172173

174+
const isSolanaAccountWithoutExternalServices =
175+
!isExternalServicesEnabled && isSolanaAccount(account);
176+
173177
const buttonTooltips = {
174178
buyButton: [
175179
///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask)
@@ -463,7 +467,11 @@ const CoinButtons = ({
463467
<IconButton
464468
className={`${classPrefix}-overview__button`}
465469
iconButtonClassName={iconButtonClassName}
466-
disabled={!isBridgeChain || !isSigningEnabled}
470+
disabled={
471+
!isSwapsChain ||
472+
!isSigningEnabled ||
473+
isSolanaAccountWithoutExternalServices
474+
}
467475
data-testid={`${classPrefix}-overview-bridge`}
468476
Icon={
469477
<Icon
@@ -491,7 +499,7 @@ const CoinButtons = ({
491499
size={IconSize.Sm}
492500
/>
493501
}
494-
disabled={!isSigningEnabled}
502+
disabled={!isSigningEnabled || isSolanaAccountWithoutExternalServices}
495503
label={t('send')}
496504
onClick={handleSendOnClick}
497505
tooltipRender={(contents: React.ReactElement) =>

0 commit comments

Comments
 (0)