From 872253d338dc220bda63459cc2f035830a11231b Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 16:37:00 +0100 Subject: [PATCH 01/19] Removed google-service-json and setup CI --- .github/workflows/android_build.yml | 15 ++++ .github/workflows/pull_request.yml | 2 +- .gitignore | 3 + app/src/debug/google-services.json | 46 ----------- app/src/develop/google-services.json | 82 ------------------- .../instrumentialTest/google-services.json | 82 ------------------- 6 files changed, 19 insertions(+), 211 deletions(-) delete mode 100644 app/src/debug/google-services.json delete mode 100644 app/src/develop/google-services.json delete mode 100644 app/src/instrumentialTest/google-services.json diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 0e18192948..df12964ce8 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -69,6 +69,11 @@ on: required: false CI_GITHUB_KEYSTORE_KEY_PASS: required: false + # Secrets for google-services: + CI_DEVELOP_GOOGLE_SERVICES: + required: true + CI_PRODUCTION_GOOGLE_SERVICES: + required: true env: ACALA_PROD_AUTH_TOKEN: ${{ secrets.ACALA_PROD_AUTH_TOKEN }} @@ -86,6 +91,7 @@ env: DWELLIR_API_KEY: ${{ secrets.DWELLIR_API_KEY }} WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} + CI_MARKET_KEYSTORE_PASS: ${{ secrets.CI_MARKET_KEYSTORE_PASS }} CI_MARKET_KEYSTORE_PASS: ${{ secrets.CI_MARKET_KEYSTORE_PASS }} CI_MARKET_KEYSTORE_KEY_ALIAS: ${{ secrets.CI_MARKET_KEYSTORE_KEY_ALIAS }} CI_MARKET_KEYSTORE_KEY_PASS: ${{ secrets.CI_MARKET_KEYSTORE_KEY_PASS }} @@ -100,6 +106,9 @@ env: CI_GITHUB_KEYSTORE_KEY_PASS: ${{ secrets.CI_GITHUB_KEYSTORE_KEY_PASS }} CI_GITHUB_KEYSTORE_KEY_FILE: ${{ secrets.BASE64_GITHUB_KEYSTORE_FILE }} + CI_DEVELOP_GOOGLE_SERVICES_FILE: ${{ secrets.CI_DEVELOP_GOOGLE_SERVICES }} + CI_PRODUCTION_GOOGLE_SERVICES_FILE: ${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES }} + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -138,6 +147,12 @@ jobs: fileDir: './app/' encodedString: ${{ env.CI_MARKET_KEY_FILE }} + - name: 📂 Set up Google Services for Debug flavor + if: ${{ !startsWith(inputs.gradlew-command, 'false') }} + run: | + echo "${{ secrets.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json + echo "${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json + - name: 🏗 Build app if: ${{ !startsWith(inputs.gradlew-command, 'false') }} run: ./gradlew ${{ inputs.gradlew-command }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 00d072f6e4..0925a228f5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -6,7 +6,7 @@ on: jobs: test: - uses: novasamatech/nova-wallet-android/.github/workflows/android_build.yml@develop + uses: novasamatech/nova-wallet-android/.github/workflows/android_build.yml@fix/remove-google-services with: branch: ${{github.head_ref}} gradlew-command: assembleDevelop diff --git a/.gitignore b/.gitignore index 214cd52328..ea3ad5bfb5 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ app/*.apk !/core-db/schemas/io.novafoundation.nova.core_db.AppDatabase/2.json !/core-db/schemas/io.novafoundation.nova.core_db.AppDatabase/8.json !/core-db/schemas/io.novafoundation.nova.core_db.AppDatabase/9.json + +google-services.json + diff --git a/app/src/debug/google-services.json b/app/src/debug/google-services.json deleted file mode 100644 index 6a0935689b..0000000000 --- a/app/src/debug/google-services.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "project_info": { - "project_number": "171267697857", - "project_id": "nova-wallet-dev", - "storage_bucket": "nova-wallet-dev.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:171267697857:android:d987123a4a81a1e5267840", - "android_client_info": { - "package_name": "io.novafoundation.nova.debug" - } - }, - "oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyBVjHJ5scX6GEKAhjKtLDvfPEGZcoLXty8" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "171267697857-r9i2v9goejmkti198fnasft5anm7vdfk.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "io.novawallet.nova" - } - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/app/src/develop/google-services.json b/app/src/develop/google-services.json deleted file mode 100644 index 80902bc5d4..0000000000 --- a/app/src/develop/google-services.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "project_info": { - "project_number": "171267697857", - "project_id": "nova-wallet-dev", - "storage_bucket": "nova-wallet-dev.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:171267697857:android:d987123a4a81a1e5267840", - "android_client_info": { - "package_name": "io.novafoundation.nova.debug" - } - }, - "oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyBVjHJ5scX6GEKAhjKtLDvfPEGZcoLXty8" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "171267697857-1oermg1hb058890b55ie40ch4vl4rv6b.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "io.nova.novawallet.dev" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:171267697857:android:a456988f1af9a191267840", - "android_client_info": { - "package_name": "io.novafoundation.nova.dev" - } - }, - "oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyBVjHJ5scX6GEKAhjKtLDvfPEGZcoLXty8" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "171267697857-1oermg1hb058890b55ie40ch4vl4rv6b.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "io.nova.novawallet.dev" - } - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/app/src/instrumentialTest/google-services.json b/app/src/instrumentialTest/google-services.json deleted file mode 100644 index 80902bc5d4..0000000000 --- a/app/src/instrumentialTest/google-services.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "project_info": { - "project_number": "171267697857", - "project_id": "nova-wallet-dev", - "storage_bucket": "nova-wallet-dev.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:171267697857:android:d987123a4a81a1e5267840", - "android_client_info": { - "package_name": "io.novafoundation.nova.debug" - } - }, - "oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyBVjHJ5scX6GEKAhjKtLDvfPEGZcoLXty8" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "171267697857-1oermg1hb058890b55ie40ch4vl4rv6b.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "io.nova.novawallet.dev" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:171267697857:android:a456988f1af9a191267840", - "android_client_info": { - "package_name": "io.novafoundation.nova.dev" - } - }, - "oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyBVjHJ5scX6GEKAhjKtLDvfPEGZcoLXty8" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "171267697857-m8ualu05e8trer0rpc5or4i6i8qjsrsl.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "171267697857-1oermg1hb058890b55ie40ch4vl4rv6b.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "io.nova.novawallet.dev" - } - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file From 41f217ce8b0e3106180168835b6958c03c4c0ad7 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 16:38:57 +0100 Subject: [PATCH 02/19] Update android_build.yml --- .github/workflows/android_build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index df12964ce8..407a96fdf4 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -91,7 +91,6 @@ env: DWELLIR_API_KEY: ${{ secrets.DWELLIR_API_KEY }} WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }} - CI_MARKET_KEYSTORE_PASS: ${{ secrets.CI_MARKET_KEYSTORE_PASS }} CI_MARKET_KEYSTORE_PASS: ${{ secrets.CI_MARKET_KEYSTORE_PASS }} CI_MARKET_KEYSTORE_KEY_ALIAS: ${{ secrets.CI_MARKET_KEYSTORE_KEY_ALIAS }} CI_MARKET_KEYSTORE_KEY_PASS: ${{ secrets.CI_MARKET_KEYSTORE_KEY_PASS }} From 59b8738804049f6cceca8367f55a245f4a0bb7dc Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 16:43:23 +0100 Subject: [PATCH 03/19] Moved importing google service before install dependencies --- .github/workflows/android_build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 407a96fdf4..fd5084b1ae 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -123,6 +123,12 @@ jobs: with: ref: ${{ inputs.branch }} + - name: 📂 Set up Google Services for Debug flavor + if: ${{ !startsWith(inputs.gradlew-command, 'false') }} + run: | + echo "${{ secrets.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json + echo "${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json + - name: 🔧 Install dependencies uses: ./.github/workflows/install/ @@ -146,12 +152,6 @@ jobs: fileDir: './app/' encodedString: ${{ env.CI_MARKET_KEY_FILE }} - - name: 📂 Set up Google Services for Debug flavor - if: ${{ !startsWith(inputs.gradlew-command, 'false') }} - run: | - echo "${{ secrets.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json - echo "${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json - - name: 🏗 Build app if: ${{ !startsWith(inputs.gradlew-command, 'false') }} run: ./gradlew ${{ inputs.gradlew-command }} From c857f78b8a64d51053448b3b42c89339dcfe3b20 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 16:47:03 +0100 Subject: [PATCH 04/19] Fixed env variable using --- .github/workflows/android_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index fd5084b1ae..87e3600b38 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -126,8 +126,8 @@ jobs: - name: 📂 Set up Google Services for Debug flavor if: ${{ !startsWith(inputs.gradlew-command, 'false') }} run: | - echo "${{ secrets.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json - echo "${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json + echo "${{ CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json + echo "${{ CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From a11c7e33e2c977395e5c0344c64d4b95e4a9d4fd Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 16:49:09 +0100 Subject: [PATCH 05/19] Update android_build.yml --- .github/workflows/android_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 87e3600b38..74df503466 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -126,8 +126,8 @@ jobs: - name: 📂 Set up Google Services for Debug flavor if: ${{ !startsWith(inputs.gradlew-command, 'false') }} run: | - echo "${{ CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json - echo "${{ CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json + echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json + echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From feee940c0bc284114af8f5b4adfe28c52b059b16 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 16:57:28 +0100 Subject: [PATCH 06/19] Add base64-encryption --- .github/workflows/android_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 74df503466..04a0631e56 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -125,6 +125,7 @@ jobs: - name: 📂 Set up Google Services for Debug flavor if: ${{ !startsWith(inputs.gradlew-command, 'false') }} + uses: timheuer/base64-to-file@v1.1 run: | echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json From 19f0c7de4274d1dea6543b9aa83bfd164360eafd Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 17:04:16 +0100 Subject: [PATCH 07/19] Update android_build.yml --- .github/workflows/android_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 04a0631e56..3383a23e60 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -123,12 +123,12 @@ jobs: with: ref: ${{ inputs.branch }} - - name: 📂 Set up Google Services for Debug flavor + - name: 📂 Set up Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} uses: timheuer/base64-to-file@v1.1 run: | - echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json - echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json + echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" | base64 -d > ./app/google-services.json + echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" | base64 -d > ./app/src/release/google-services.json - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From d665a6f909ac5e56a3ce229a277694a439e90e01 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 17:09:04 +0100 Subject: [PATCH 08/19] Update android_build.yml --- .github/workflows/android_build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 3383a23e60..1de99492ac 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -125,7 +125,6 @@ jobs: - name: 📂 Set up Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} - uses: timheuer/base64-to-file@v1.1 run: | echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" | base64 -d > ./app/google-services.json echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" | base64 -d > ./app/src/release/google-services.json From e76b8f9c2ea0ea8d9f2d9d3c6cac441e0a1159b3 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 17:16:43 +0100 Subject: [PATCH 09/19] Update android_build.yml --- .github/workflows/android_build.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 1de99492ac..62fd8fa96f 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -123,11 +123,21 @@ jobs: with: ref: ${{ inputs.branch }} - - name: 📂 Set up Google Services + - name: 📂 Set up Google Services debug if: ${{ !startsWith(inputs.gradlew-command, 'false') }} - run: | - echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" | base64 -d > ./app/google-services.json - echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" | base64 -d > ./app/src/release/google-services.json + uses: timheuer/base64-to-file@v1.1 + with: + fileName: 'google-services.json' + fileDir: './app/' + encodedString: ${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }} + + - name: 📂 Set up Google Services release + if: ${{ !startsWith(inputs.gradlew-command, 'false') }} + uses: timheuer/base64-to-file@v1.1 + with: + fileName: 'google-services.json' + fileDir: './app/release/' + encodedString: ${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }} - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From 1d6e2ec3794a46f80a802daefe5e38ee203f770b Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Mon, 26 Feb 2024 18:03:53 +0100 Subject: [PATCH 10/19] Update android_build.yml --- .github/workflows/android_build.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 62fd8fa96f..6bd6abed78 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -123,21 +123,11 @@ jobs: with: ref: ${{ inputs.branch }} - - name: 📂 Set up Google Services debug + - name: 📂 Set up Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} - uses: timheuer/base64-to-file@v1.1 - with: - fileName: 'google-services.json' - fileDir: './app/' - encodedString: ${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }} - - - name: 📂 Set up Google Services release - if: ${{ !startsWith(inputs.gradlew-command, 'false') }} - uses: timheuer/base64-to-file@v1.1 - with: - fileName: 'google-services.json' - fileDir: './app/release/' - encodedString: ${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }} + run: | + echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json + echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From e2720db21a7545a3cb8bf1c8c6ebff6a41eed2f7 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Tue, 27 Feb 2024 08:40:19 +0100 Subject: [PATCH 11/19] Update android_build.yml --- .github/workflows/android_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 6bd6abed78..b1ef412216 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -126,8 +126,8 @@ jobs: - name: 📂 Set up Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} run: | - echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json - echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json + echo ${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }} > ./app/google-services.json + echo ${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }} > ./app/src/release/google-services.json - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From 86e0bfcafd4d660284296a0fcba5ef87f799f173 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Tue, 27 Feb 2024 09:15:38 +0100 Subject: [PATCH 12/19] Update android_build.yml --- .github/workflows/android_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index b1ef412216..6bd6abed78 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -126,8 +126,8 @@ jobs: - name: 📂 Set up Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} run: | - echo ${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }} > ./app/google-services.json - echo ${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }} > ./app/src/release/google-services.json + echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json + echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From e27796962f35fb0f3b2ea1a01871a000dd20b415 Mon Sep 17 00:00:00 2001 From: Stepan Lavrentev Date: Tue, 27 Feb 2024 13:47:55 +0300 Subject: [PATCH 13/19] try base64 for google services --- .github/workflows/android_build.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 6bd6abed78..de61fd0124 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -69,11 +69,6 @@ on: required: false CI_GITHUB_KEYSTORE_KEY_PASS: required: false - # Secrets for google-services: - CI_DEVELOP_GOOGLE_SERVICES: - required: true - CI_PRODUCTION_GOOGLE_SERVICES: - required: true env: ACALA_PROD_AUTH_TOKEN: ${{ secrets.ACALA_PROD_AUTH_TOKEN }} @@ -105,8 +100,6 @@ env: CI_GITHUB_KEYSTORE_KEY_PASS: ${{ secrets.CI_GITHUB_KEYSTORE_KEY_PASS }} CI_GITHUB_KEYSTORE_KEY_FILE: ${{ secrets.BASE64_GITHUB_KEYSTORE_FILE }} - CI_DEVELOP_GOOGLE_SERVICES_FILE: ${{ secrets.CI_DEVELOP_GOOGLE_SERVICES }} - CI_PRODUCTION_GOOGLE_SERVICES_FILE: ${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES }} concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -125,9 +118,19 @@ jobs: - name: 📂 Set up Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} - run: | - echo "${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}" > ./app/google-services.json - echo "${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}" > ./app/src/release/google-services.json + uses: davidSchuppa/base64Secret-toFile-action@v3 + with: + secret: ${{ secrets.CI_DEVELOP_GOOGLE_SERVICES }} + filename: google-services.json + destination-path: ./app + + - name: 📂 Set up Google Services + if: ${{ !startsWith(inputs.gradlew-command, 'false') }} + uses: davidSchuppa/base64Secret-toFile-action@v3 + with: + secret: ${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES }} + filename: google-services.json + destination-path: ./app/src/release/ - name: 🔧 Install dependencies uses: ./.github/workflows/install/ From cf6596fea32c5ea06339b260985440a7952465a4 Mon Sep 17 00:00:00 2001 From: Stepan Lavrentev Date: Tue, 27 Feb 2024 14:01:32 +0300 Subject: [PATCH 14/19] fix naming --- .github/workflows/android_build.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index de61fd0124..e98713109f 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -69,6 +69,11 @@ on: required: false CI_GITHUB_KEYSTORE_KEY_PASS: required: false + # Secrets for google-services: + CI_DEVELOP_GOOGLE_SERVICES: + required: true + CI_PRODUCTION_GOOGLE_SERVICES: + required: true env: ACALA_PROD_AUTH_TOKEN: ${{ secrets.ACALA_PROD_AUTH_TOKEN }} @@ -100,6 +105,8 @@ env: CI_GITHUB_KEYSTORE_KEY_PASS: ${{ secrets.CI_GITHUB_KEYSTORE_KEY_PASS }} CI_GITHUB_KEYSTORE_KEY_FILE: ${{ secrets.BASE64_GITHUB_KEYSTORE_FILE }} + CI_DEVELOP_GOOGLE_SERVICES_FILE: ${{ secrets.CI_DEVELOP_GOOGLE_SERVICES }} + CI_PRODUCTION_GOOGLE_SERVICES_FILE: ${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES }} concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -116,19 +123,19 @@ jobs: with: ref: ${{ inputs.branch }} - - name: 📂 Set up Google Services + - name: 📂 Set up DEV Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} uses: davidSchuppa/base64Secret-toFile-action@v3 with: - secret: ${{ secrets.CI_DEVELOP_GOOGLE_SERVICES }} + secret: ${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }} filename: google-services.json destination-path: ./app - - name: 📂 Set up Google Services + - name: 📂 Set up PROD Google Services if: ${{ !startsWith(inputs.gradlew-command, 'false') }} uses: davidSchuppa/base64Secret-toFile-action@v3 with: - secret: ${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES }} + secret: ${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }} filename: google-services.json destination-path: ./app/src/release/ From 23341472d0fac3e0823b32fa6890bd4206f4566c Mon Sep 17 00:00:00 2001 From: Stepan Lavrentev Date: Tue, 27 Feb 2024 14:12:40 +0300 Subject: [PATCH 15/19] fix path --- .github/workflows/android_build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index e98713109f..4bcba8f9f6 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -124,15 +124,13 @@ jobs: ref: ${{ inputs.branch }} - name: 📂 Set up DEV Google Services - if: ${{ !startsWith(inputs.gradlew-command, 'false') }} uses: davidSchuppa/base64Secret-toFile-action@v3 with: secret: ${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }} filename: google-services.json - destination-path: ./app + destination-path: ./app/ - name: 📂 Set up PROD Google Services - if: ${{ !startsWith(inputs.gradlew-command, 'false') }} uses: davidSchuppa/base64Secret-toFile-action@v3 with: secret: ${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }} From 142d302480f77926d65b62b79848e7e618ecab92 Mon Sep 17 00:00:00 2001 From: Stepan Lavrentev Date: Tue, 27 Feb 2024 14:19:54 +0300 Subject: [PATCH 16/19] return pull_request value back --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 0925a228f5..00d072f6e4 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -6,7 +6,7 @@ on: jobs: test: - uses: novasamatech/nova-wallet-android/.github/workflows/android_build.yml@fix/remove-google-services + uses: novasamatech/nova-wallet-android/.github/workflows/android_build.yml@develop with: branch: ${{github.head_ref}} gradlew-command: assembleDevelop From ccd7e9b4eb30ede3d8dc6716ef4e3caabdf5e52a Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Tue, 12 Mar 2024 16:58:49 +0100 Subject: [PATCH 17/19] Changed DApp orientation mode to consider user settings --- .../presentation/browser/main/DAppBrowserFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature-dapp-impl/src/main/java/io/novafoundation/nova/feature_dapp_impl/presentation/browser/main/DAppBrowserFragment.kt b/feature-dapp-impl/src/main/java/io/novafoundation/nova/feature_dapp_impl/presentation/browser/main/DAppBrowserFragment.kt index 69b76aa99a..46742a906b 100644 --- a/feature-dapp-impl/src/main/java/io/novafoundation/nova/feature_dapp_impl/presentation/browser/main/DAppBrowserFragment.kt +++ b/feature-dapp-impl/src/main/java/io/novafoundation/nova/feature_dapp_impl/presentation/browser/main/DAppBrowserFragment.kt @@ -94,7 +94,7 @@ class DAppBrowserFragment : BaseFragment(), OptionsBottomS dappBrowserMore.setOnClickListener { moreClicked() } - requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR + requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER } override fun onDestroyView() { From cc78349614db604c93804b8dc3a16f718fc2cfe3 Mon Sep 17 00:00:00 2001 From: valentunn <70131744+valentunn@users.noreply.github.com> Date: Fri, 15 Mar 2024 23:01:16 +0700 Subject: [PATCH 18/19] Fix/hydra update (#1431) * Fix hydra storage name * Fix - ignore entries with null decimals --- .../assetExchange/hydraDx/stableswap/AssetRegistryApi.kt | 8 ++++---- .../assetExchange/hydraDx/stableswap/StableSwapSource.kt | 3 ++- .../runtime/storage/source/query/api/QueryableModule.kt | 2 +- .../storage/source/query/api/QueryableStorageEntry1.kt | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/AssetRegistryApi.kt b/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/AssetRegistryApi.kt index a1c27c8bef..73a8beebb1 100644 --- a/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/AssetRegistryApi.kt +++ b/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/AssetRegistryApi.kt @@ -19,12 +19,12 @@ val RuntimeMetadata.assetRegistry: AssetRegistryApi get() = AssetRegistryApi(assetRegistry()) context(StorageQueryContext) -val AssetRegistryApi.assetMetadataMap: QueryableStorageEntry1 +val AssetRegistryApi.assetMetadataMap: QueryableStorageEntry1 get() = storage1( - name = "AssetMetadataMap", + name = "Assets", binding = { decoded, _ -> bindMetadataDecimals(decoded) }, ) -private fun bindMetadataDecimals(decoded: Any): Int { - return bindInt(decoded.castToStruct()["decimals"]) +private fun bindMetadataDecimals(decoded: Any): Int? { + return decoded.castToStruct().get("decimals")?.let(::bindInt) } diff --git a/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/StableSwapSource.kt b/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/StableSwapSource.kt index 7d5e3e7845..84c013fbcf 100644 --- a/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/StableSwapSource.kt +++ b/feature-swap-impl/src/main/java/io/novafoundation/nova/feature_swap_impl/data/assetExchange/hydraDx/stableswap/StableSwapSource.kt @@ -4,6 +4,7 @@ import com.google.gson.Gson import io.novafoundation.nova.common.data.network.runtime.binding.BlockNumber import io.novafoundation.nova.common.data.network.runtime.binding.orEmpty import io.novafoundation.nova.common.utils.MultiMapList +import io.novafoundation.nova.common.utils.filterNotNull import io.novafoundation.nova.common.utils.graph.Edge import io.novafoundation.nova.common.utils.graph.Graph import io.novafoundation.nova.common.utils.graph.create @@ -223,7 +224,7 @@ private class StableSwapSource( private fun CoroutineScope.fetchAssetsPrecisionsAsync(): Deferred> { return async { remoteStorageSource.query(chain.id) { - metadata.assetRegistry.assetMetadataMap.entries() + metadata.assetRegistry.assetMetadataMap.entries().filterNotNull() } } } diff --git a/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableModule.kt b/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableModule.kt index fe6726209f..450595771e 100644 --- a/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableModule.kt +++ b/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableModule.kt @@ -18,7 +18,7 @@ fun QueryableModule.storage0(name: String, binding: QueryableStorageBi } context(StorageQueryContext) -fun QueryableModule.storage1( +fun QueryableModule.storage1( name: String, binding: QueryableStorageBinder1, keyBinding: QueryableStorageKeyBinder? = null diff --git a/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableStorageEntry1.kt b/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableStorageEntry1.kt index c4b776347d..ebe3065e62 100644 --- a/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableStorageEntry1.kt +++ b/runtime/src/main/java/io/novafoundation/nova/runtime/storage/source/query/api/QueryableStorageEntry1.kt @@ -10,7 +10,7 @@ import kotlinx.coroutines.flow.filterNotNull typealias QueryableStorageBinder1 = (dynamicInstance: Any, key: K) -> V -interface QueryableStorageEntry1 { +interface QueryableStorageEntry1 { context(StorageQueryContext) suspend fun keys(): List @@ -46,7 +46,7 @@ fun QueryableStorageEntry1.observeNonNull(argument: I): Flow< context(StorageQueryContext) suspend fun QueryableStorageEntry1.queryNonNull(argument: I): T = requireNotNull(query(argument)) -internal class RealQueryableStorageEntry1( +internal class RealQueryableStorageEntry1( private val storageEntry: StorageEntry, private val binding: QueryableStorageBinder1, @Suppress("UNCHECKED_CAST") private val keyBinding: QueryableStorageKeyBinder? = null From 129a2c7112118f51e8aee313b53246d8842d15a5 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Fri, 15 Mar 2024 17:02:28 +0100 Subject: [PATCH 19/19] Bump version --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 0124f638bc..981df9c793 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ buildscript { ext { // App version - versionName = '7.9.4' - versionCode = 122 + versionName = '7.9.5' + versionCode = 123 applicationId = "io.novafoundation.nova" releaseApplicationSuffix = "market"