Skip to content

Commit

Permalink
fix(mobile): Promocode feature flag (#794)
Browse files Browse the repository at this point in the history
* fix(mobile): Promocode feature flag

* fix(mobile): Move Spacer
  • Loading branch information
voloshinskii authored Apr 11, 2024
1 parent 78a610e commit 4ffc895
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/mobile/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export type AppConfigVars = {
disable_battery_iap_module: boolean;
disable_battery_send: boolean;
disable_show_unverified_token: boolean;
disable_battery_promo_module: boolean;
disable_tonstakers: boolean;
disable_holders_cards: boolean;
exclude_jetton_chart_periods: boolean;
Expand Down Expand Up @@ -99,6 +100,7 @@ const defaultConfig: Partial<AppConfigVars> = {
disable_battery: false,
disable_battery_send: false,
disable_battery_iap_module: Platform.OS === 'android', // Enable for iOS, disable for Android
disable_battery_promo_module: true,

disable_show_unverified_token: false,
disable_tonstakers: false,
Expand Down
9 changes: 7 additions & 2 deletions packages/shared/components/RefillBattery/RefillBattery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const RefillBattery = memo<RefillBatteryProps>((props) => {
const bottomInsets = useSafeAreaInsets().bottom;

const isInAppPurchasesDisabled = config.get('disable_battery_iap_module');
const isPromoDisabled = config.get('disable_battery_promo_module');

return (
<Animated.ScrollView
Expand Down Expand Up @@ -90,8 +91,12 @@ export const RefillBattery = memo<RefillBatteryProps>((props) => {
)}
<View style={styles.indent}>
{!isInAppPurchasesDisabled ? <RefillBatteryIAP /> : null}
<RechargeByPromoButton />
<Spacer y={16} />
{!isPromoDisabled ? (
<>
<RechargeByPromoButton />
<Spacer y={16} />
</>
) : null}
<RestorePurchases />
</View>
</Animated.ScrollView>
Expand Down

0 comments on commit 4ffc895

Please sign in to comment.