Skip to content

Commit

Permalink
fix: do not link to haliday for Buy
Browse files Browse the repository at this point in the history
  • Loading branch information
meeh0w committed Jan 7, 2025
1 parent 342866d commit 76b1d1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/background/services/featureFlags/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export enum FeatureGates {
BLOCKAID_DAPP_SCAN_WARNING = 'blockaid-dapp-scan-warning',
BLOCKAID_TRANSACTION_SCAN = 'blockaid-transaction-scan',
BLOCKAID_JSONRPC_SCAN = 'blockaid-jsonrpc-scan',
HALLIDAY_BUY_FLOW = 'halliday-buy-flow',
HALLIDAY_BRIDGE_BANNER = 'halliday-bridge-banner',
}

Expand Down Expand Up @@ -97,7 +96,6 @@ export const DISABLED_FLAG_VALUES: FeatureFlags = {
[FeatureGates.BLOCKAID_TRANSACTION_SCAN]: false,
[FeatureGates.BLOCKAID_JSONRPC_SCAN]: false,
[FeatureGates.HALLIDAY_BRIDGE_BANNER]: false,
[FeatureGates.HALLIDAY_BUY_FLOW]: false,
};

// Default flags are used when posthog is not available
Expand Down Expand Up @@ -148,7 +146,6 @@ export const DEFAULT_FLAGS: FeatureFlags = {
[FeatureGates.BLOCKAID_TRANSACTION_SCAN]: true,
[FeatureGates.BLOCKAID_JSONRPC_SCAN]: true,
[FeatureGates.HALLIDAY_BRIDGE_BANNER]: true,
[FeatureGates.HALLIDAY_BUY_FLOW]: true,
};

export enum FeatureFlagEvents {
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/HallidayBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const HallidayBanner = () => {
</IconButton>
<CardActionArea
component={Link}
href={`${getCoreWebUrl()}/bridge?halliday=1`}
href={`${getCoreWebUrl()}/bridge?useHalliday=1`}
rel="noopener noreferrer"
target="_blank"
>
Expand Down
13 changes: 2 additions & 11 deletions src/components/common/fab/FAB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import {
useIsFunctionAvailable,
} from '@src/hooks/useIsFunctionAvailable';
import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider';
import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider';
import { FeatureGates } from '@src/background/services/featureFlags/models';
import { getCoreWebUrl } from '@src/utils/getCoreWebUrl';
import { Flipper } from '../Flipper';

Expand Down Expand Up @@ -109,7 +107,6 @@ export function FAB({ isContentScrolling }: { isContentScrolling: boolean }) {
const fabRef = useRef<HTMLButtonElement>(null);
const fadeTimer = useRef<ReturnType<typeof setTimeout>>();
const [isExpanded, setIsExpanded] = useState(true);
const { isFlagEnabled } = useFeatureFlagContext();

const FABMenuItems = [
{
Expand Down Expand Up @@ -139,14 +136,8 @@ export function FAB({ isContentScrolling }: { isContentScrolling: boolean }) {
text: t('Buy'),
name: FunctionNames.BUY,
icon: <BuyIcon size={24} sx={{ color: theme.palette.common.black }} />,
onclick: () => {
const hallidayParam = isFlagEnabled(FeatureGates.HALLIDAY_BUY_FLOW)
? '?halliday=1'
: '';
const url = `${getCoreWebUrl()}/buy${hallidayParam}`;

window.open(url, '_blank', 'noreferrer');
},
onclick: () =>
window.open(`${getCoreWebUrl()}/buy`, '_blank', 'noreferrer'),
},
{
text: t('Bridge'),
Expand Down

0 comments on commit 76b1d1e

Please sign in to comment.