Skip to content

Commit 982fec2

Browse files
committed
feat: remove supported-platforms feature gate
- Remove feature flag check for supported-platforms in wallet-drawer.tsx - Always show all network platforms (starknet, ethereum, base, arbitrum, optimism) - Remove supported-platforms from Feature type in features.tsx
1 parent 48edefa commit 982fec2

File tree

2 files changed

+20
-29
lines changed

2 files changed

+20
-29
lines changed

packages/keychain/src/components/purchasenew/checkout/onchain/wallet-drawer.tsx

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export function WalletSelectionDrawer({
3434
onClose,
3535
}: WalletSelectionDrawerProps) {
3636
const navigate = useNavigate();
37-
const isSupportedPlatformsEnabled = useFeature("supported-platforms");
3837
const isApplePayEnabled = useFeature("apple-pay-support");
3938

4039
const { isMainnet, externalDetectWallets } = useConnection();
@@ -56,17 +55,13 @@ export function WalletSelectionDrawer({
5655
>(new Map());
5756

5857
const selectedNetworks = useMemo(() => {
59-
const platforms = isSupportedPlatformsEnabled
60-
? "starknet;ethereum;base;arbitrum;optimism"
61-
: "starknet";
62-
63-
let networks =
64-
platforms
65-
?.split(";")
66-
.map((platform) =>
67-
networkWalletData.networks.find((n) => n.platform === platform),
68-
)
69-
.filter(Boolean) || [];
58+
const platforms = ["starknet", "ethereum", "base", "arbitrum", "optimism"];
59+
60+
let networks = platforms
61+
.map((platform) =>
62+
networkWalletData.networks.find((n) => n.platform === platform),
63+
)
64+
.filter(Boolean);
7065

7166
// If acquisition type is claimed, filter networks to only show those with merkle drop support
7267
if (starterpackDetails?.type === "claimed") {
@@ -82,7 +77,7 @@ export function WalletSelectionDrawer({
8277
}
8378

8479
return networks as Network[];
85-
}, [starterpackDetails, isSupportedPlatformsEnabled]);
80+
}, [starterpackDetails]);
8681

8782
// Reset state when drawer closes
8883
useEffect(() => {
@@ -335,17 +330,17 @@ export function WalletSelectionDrawer({
335330
)}
336331
</>
337332
) : // Wallet selection step
338-
isDetecting ? (
339-
<div className="flex items-center justify-center py-8">
340-
<SpinnerIcon className="animate-spin" size="lg" />
341-
</div>
342-
) : walletElements.length > 0 ? (
343-
walletElements
344-
) : (
345-
<div className="text-center text-foreground-300 py-8">
346-
No wallets detected
347-
</div>
348-
)}
333+
isDetecting ? (
334+
<div className="flex items-center justify-center py-8">
335+
<SpinnerIcon className="animate-spin" size="lg" />
336+
</div>
337+
) : walletElements.length > 0 ? (
338+
walletElements
339+
) : (
340+
<div className="text-center text-foreground-300 py-8">
341+
No wallets detected
342+
</div>
343+
)}
349344

350345
{error && (
351346
<div className="text-destructive-100 text-sm mt-2">

packages/keychain/src/hooks/features.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ import React, {
1010

1111
const LOCAL_STORAGE_KEY = "@cartridge/features";
1212

13-
export type Feature =
14-
| "none"
15-
| "connections"
16-
| "supported-platforms"
17-
| "apple-pay-support";
13+
export type Feature = "none" | "connections" | "apple-pay-support";
1814

1915
// --- Helper Functions ---
2016

0 commit comments

Comments
 (0)