Skip to content

Commit

Permalink
[PAY-1530] adds usdc feature flag and hooks for fetching it (#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
schottra authored Jun 26, 2023
1 parent a672754 commit 1658810
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/common/src/services/remote-config/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export enum FeatureFlags {
PLAYLIST_UPDATES_POST_QA = 'playlist_updates_post_qa',
AI_ATTRIBUTION = 'ai_attribution',
DEVELOPER_APPS_PAGE = 'developer_apps_page',
UPLOAD_REDESIGN_ENABLED = 'upload_redesign_enabled'
UPLOAD_REDESIGN_ENABLED = 'upload_redesign_enabled',
USDC_PURCHASES = 'usdc_purchases'
}

type FlagDefaults = Record<FeatureFlags, boolean>
Expand Down Expand Up @@ -110,5 +111,6 @@ export const flagDefaults: FlagDefaults = {
[FeatureFlags.PLAYLIST_UPDATES_POST_QA]: false,
[FeatureFlags.AI_ATTRIBUTION]: false,
[FeatureFlags.DEVELOPER_APPS_PAGE]: false,
[FeatureFlags.UPLOAD_REDESIGN_ENABLED]: false
[FeatureFlags.UPLOAD_REDESIGN_ENABLED]: false,
[FeatureFlags.USDC_PURCHASES]: false
}
6 changes: 6 additions & 0 deletions packages/mobile/src/hooks/useIsUSDCEnabled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { FeatureFlags } from '@audius/common'

import { useFeatureFlag } from './useRemoteConfig'

export const useIsUSDCEnabled = () =>
useFeatureFlag(FeatureFlags.USDC_PURCHASES).isEnabled
6 changes: 6 additions & 0 deletions packages/web/src/hooks/useIsUSDCEnabled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { FeatureFlags } from '@audius/common'

import { useFlag } from './useRemoteConfig'

export const useIsUSDCEnabled = () =>
useFlag(FeatureFlags.USDC_PURCHASES).isEnabled

0 comments on commit 1658810

Please sign in to comment.