Skip to content

Commit

Permalink
feat(suite-native): whitelist pol and bnb and remove feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
vytick committed Nov 7, 2024
1 parent fdd9f7c commit 556c7c0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
4 changes: 3 additions & 1 deletion suite-native/config/src/supportedNetworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ export const orderedAccountTypes: AccountType[] = [
'ledger',
];

const discoveryBlacklist: NetworkSymbol[] = ['sol', 'dsol', 'pol', 'bnb', 'op'];
const discoveryBlacklist: NetworkSymbol[] = ['sol', 'dsol', 'op'];

// All supported coins for device discovery
export const networkSymbolsWhitelistMap = {
mainnet: [
'btc',
'eth',
'pol',
'bnb',
'ltc',
'etc',
'ada',
Expand Down
8 changes: 0 additions & 8 deletions suite-native/discovery/src/discoveryConfigSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,11 @@ export const selectDiscoveryInfo = (state: DiscoveryConfigSliceRootState) =>

export const selectFeatureFlagEnabledNetworkSymbols = memoize(
(state: FeatureFlagsRootState & DiscoveryConfigSliceRootState) => {
const isPolygonEnabled = selectIsFeatureFlagEnabled(state, FeatureFlag.IsPolygonEnabled);
const isBscEnabled = selectIsFeatureFlagEnabled(state, FeatureFlag.IsBscEnabled);
const isSolanaEnabled = selectIsFeatureFlagEnabled(state, FeatureFlag.IsSolanaEnabled);
const areTestnetsEnabled = selectAreTestnetsEnabled(state);

const allowlist: NetworkSymbol[] = [];

if (isPolygonEnabled) {
allowlist.push('pol');
}
if (isBscEnabled) {
allowlist.push('bnb');
}
if (isSolanaEnabled) {
allowlist.push('sol');
if (areTestnetsEnabled) {
Expand Down
6 changes: 0 additions & 6 deletions suite-native/feature-flags/src/featureFlagsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export const FeatureFlag = {
IsBitcoinLikeSendEnabled: 'isBitcoinLikeSendEnabled',
IsEthereumSendEnabled: 'isEthereumSendEnabled',
IsRegtestEnabled: 'isRegtestEnabled',
IsPolygonEnabled: 'IsPolygonEnabled',
IsBscEnabled: 'IsBscEnabled',
IsSolanaEnabled: 'IsSolanaEnabled',
IsConnectPopupEnabled: 'IsConnectPopupEnabled',
} as const;
Expand All @@ -26,8 +24,6 @@ export const featureFlagsInitialState: FeatureFlagsState = {
[FeatureFlag.IsBitcoinLikeSendEnabled]: isAndroid() && isDevelopOrDebugEnv(),
[FeatureFlag.IsEthereumSendEnabled]: isAndroid() && isDevelopOrDebugEnv(),
[FeatureFlag.IsRegtestEnabled]: isDebugEnv() || isDetoxTestBuild(),
[FeatureFlag.IsPolygonEnabled]: false,
[FeatureFlag.IsBscEnabled]: false,
[FeatureFlag.IsSolanaEnabled]: false,
[FeatureFlag.IsConnectPopupEnabled]: isDevelopOrDebugEnv(),
};
Expand All @@ -37,8 +33,6 @@ export const featureFlagsPersistedKeys: Array<keyof FeatureFlagsState> = [
FeatureFlag.IsBitcoinLikeSendEnabled,
FeatureFlag.IsEthereumSendEnabled,
FeatureFlag.IsRegtestEnabled,
FeatureFlag.IsPolygonEnabled,
FeatureFlag.IsBscEnabled,
FeatureFlag.IsSolanaEnabled,
FeatureFlag.IsConnectPopupEnabled,
];
Expand Down
2 changes: 0 additions & 2 deletions suite-native/module-dev-utils/src/components/FeatureFlags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ const featureFlagsTitleMap = {
[FeatureFlagEnum.IsBitcoinLikeSendEnabled]: 'Bitcoin-like coins send',
[FeatureFlagEnum.IsEthereumSendEnabled]: 'Ethereum-like coins send',
[FeatureFlagEnum.IsRegtestEnabled]: 'Regtest',
[FeatureFlagEnum.IsPolygonEnabled]: 'Polygon',
[FeatureFlagEnum.IsBscEnabled]: 'BNB Smart Chain',
[FeatureFlagEnum.IsSolanaEnabled]: 'Solana',
[FeatureFlagEnum.IsConnectPopupEnabled]: 'Connect Popup',
} as const satisfies Record<FeatureFlagEnum, string>;
Expand Down

0 comments on commit 556c7c0

Please sign in to comment.