diff --git a/.github/workflows/distribute-android.yml b/.github/workflows/distribute-android.yml index 3d32052b9..cb740466d 100644 --- a/.github/workflows/distribute-android.yml +++ b/.github/workflows/distribute-android.yml @@ -7,14 +7,23 @@ on: type: choice description: IS_DEVELOPMENT options: - - 0 - - 1 + - false + - true + IS_SSS_ENABLED: type: choice description: IS_SSS_ENABLED options: - false - true + + IS_WELCOME_NEWS_ENABLED: + type: choice + description: IS_WELCOME_NEWS_ENABLED + options: + - false + - true + workflow_call: inputs: IS_DEVELOPMENT: @@ -23,6 +32,9 @@ on: IS_SSS_ENABLED: required: true type: string + IS_WELCOME_NEWS_ENABLED: + required: true + type: string jobs: build: @@ -79,6 +91,7 @@ jobs: echo "ADJUST_TOKEN=${{secrets.ADJUST_TOKEN}}" >> .env echo "ADJUST_ENVIRONMENT=${{secrets.ADJUST_ENVIRONMENT}}" >> .env echo "IS_SSS_ENABLED=${{github.event.inputs.IS_SSS_ENABLED}}" >> .env + echo "IS_WELCOME_NEWS_ENABLED=${{github.event.inputs.IS_WELCOME_NEWS_ENABLED}}" >> .env - name: Install Fastlane run: | diff --git a/.github/workflows/distribute-ios.yml b/.github/workflows/distribute-ios.yml index f5d442894..d09189f97 100644 --- a/.github/workflows/distribute-ios.yml +++ b/.github/workflows/distribute-ios.yml @@ -7,14 +7,23 @@ on: type: choice description: IS_DEVELOPMENT options: - - 0 - - 1 + - false + - true + IS_SSS_ENABLED: type: choice description: IS_SSS_ENABLED options: - false - true + + IS_WELCOME_NEWS_ENABLED: + type: choice + description: IS_WELCOME_NEWS_ENABLED + options: + - false + - true + workflow_call: inputs: IS_DEVELOPMENT: @@ -23,6 +32,9 @@ on: IS_SSS_ENABLED: required: true type: string + IS_WELCOME_NEWS_ENABLED: + required: true + type: string jobs: build: @@ -95,6 +107,7 @@ jobs: echo "ADJUST_TOKEN=${{secrets.ADJUST_TOKEN}}" >> .env echo "ADJUST_ENVIRONMENT=${{secrets.ADJUST_ENVIRONMENT}}" >> .env echo "IS_SSS_ENABLED=${{github.event.inputs.IS_SSS_ENABLED}}" >> .env + echo "IS_WELCOME_NEWS_ENABLED=${{github.event.inputs.IS_WELCOME_NEWS_ENABLED}}" >> .env - name: Execute build run: | diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index cc99b08f0..2166b7d53 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -3,6 +3,13 @@ name: Distribute apps on: workflow_dispatch: inputs: + IS_WELCOME_NEWS_ENABLED: + type: choice + description: IS_WELCOME_NEWS_ENABLED + options: + - false + - true + IS_SSS_ENABLED: type: choice description: IS_SSS_ENABLED @@ -32,8 +39,9 @@ jobs: uses: ./.github/workflows/distribute-android.yml secrets: inherit with: - IS_DEVELOPMENT: 0 + IS_DEVELOPMENT: false IS_SSS_ENABLED: ${{github.event.inputs.IS_SSS_ENABLED}} + IS_WELCOME_NEWS_ENABLED: ${{github.event.inputs.IS_WELCOME_NEWS_ENABLED}} needs: - test @@ -43,8 +51,9 @@ jobs: uses: ./.github/workflows/distribute-ios.yml secrets: inherit with: - IS_DEVELOPMENT: 0 + IS_DEVELOPMENT: false IS_SSS_ENABLED: ${{github.event.inputs.IS_SSS_ENABLED}} + IS_WELCOME_NEWS_ENABLED: ${{github.event.inputs.IS_WELCOME_NEWS_ENABLED}} needs: - test diff --git a/src/app.tsx b/src/app.tsx index 77d1525a9..b8346ed5e 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -57,6 +57,7 @@ import {StakingDelegateScreen} from '@app/screens/staking-delegate'; import {StakingInfoScreen} from '@app/screens/staking-info'; import {StakingUnDelegateScreen} from '@app/screens/staking-undelegate'; import {StakingValidatorsScreen} from '@app/screens/staking-validators'; +import {WelcomeNewsScreen} from '@app/screens/welcome-news'; import { ActionSheetType, AppTheme, @@ -295,6 +296,17 @@ export const App = () => { }); }, []); + const initialRoute = useMemo(() => { + if (app.onboarded) { + return 'home'; + } + if (app.isWelcomeNewsEnabled) { + return 'welcomeNews'; + } + + return 'welcome'; + }, []); + // @ts-ignore return ( @@ -307,9 +319,10 @@ export const App = () => { + initialRouteName={initialRoute}> + {/* Modals group */} ; + onPress: (id: string) => void; + onPressSignup: () => void; + onPressLedger: () => void; + onPressSignIn: () => void; +}; + +export const WelcomeNews = ({ + onPressSignup, + onPressLedger, + onPressSignIn, + news, + onPress, +}: WelcomeProps) => { + const insets = useSafeAreaInsets(); + + return ( + + } + /> + +