diff --git a/.github/workflows/release-android-base.yaml b/.github/workflows/release-android-base.yaml index 41bf64e2..6e317b2c 100644 --- a/.github/workflows/release-android-base.yaml +++ b/.github/workflows/release-android-base.yaml @@ -27,10 +27,6 @@ on: description: 'Path to get the APK file' required: true type: string - env-file-path: - description: "Path + name of the env file" - required: false - type: string upload-to-bucket: description: "Upload to S3" required: false @@ -47,18 +43,10 @@ on: default: false type: boolean secrets: - project-id: - description: 'Reown Cloud ID' - required: true firebase-app-id: required: true gsa-key: required: true - relay-url: - description: 'Relay URL' - required: false - sentry-dsn: - required: false sentry-file: required: true secrets-file: @@ -108,13 +96,18 @@ jobs: # Create env file - name: Create env file run: | - ENV_FILE_CONTENT="${{ secrets.env-file }}" - ENV_FILE_PATH="${{ inputs.env-file-path }}" - if [ -n "$ENV_FILE_CONTENT" ] && [ -n "$ENV_FILE_PATH" ]; then - echo "$ENV_FILE_CONTENT" > "$ENV_FILE_PATH" - else - touch ${{ inputs.root-path }}/.env.${{ inputs.release-type }} - echo -e "ENV_PROJECT_ID=${{ secrets.project-id }}\nENV_RELAY_URL=${{ secrets.relay-url }}\nENV_SENTRY_DSN=${{ secrets.sentry-dsn }}\nENV_SENTRY_TAG=${{ inputs.release-type }}" >> ${{ inputs.root-path }}/.env.${{ inputs.release-type }} + if [ -z "${{ secrets.env-file }}" ]; then + echo "Error: env-file secret is empty or not set" + exit 1 + fi + echo "${{ secrets.env-file }}" > ${{ inputs.root-path }}/.env + + - name: Copy variant files + run: | + cd ${{ inputs.root-path }} + if [ -f "./scripts/copy-variant-files.sh" ]; then + chmod +x ./scripts/copy-variant-files.sh + ./scripts/copy-variant-files.sh ${{ inputs.release-type }} fi - name: Add Sentry file diff --git a/.github/workflows/release-appkit.yaml b/.github/workflows/release-appkit.yaml index f761a958..e4745575 100644 --- a/.github/workflows/release-appkit.yaml +++ b/.github/workflows/release-appkit.yaml @@ -1,7 +1,9 @@ -# Stub workflow to enable dispatch from feature branches -# Real implementation is on chore/ci-improvements branch name: Release AppKit +permissions: + id-token: write + contents: read + on: workflow_dispatch: inputs: @@ -26,7 +28,52 @@ on: default: false jobs: - stub: - runs-on: ubuntu-latest - steps: - - run: echo "This is a stub. Run from feature branch with --ref" + release-android: + if: ${{ inputs.platform == 'android' }} + uses: ./.github/workflows/release-android-base.yaml + with: + name: AppKit React Native + root-path: 'dapps/W3MWagmi' + release-type: ${{ inputs.release-type }} + project-type: 'dapp' + output-path: ${{ inputs.release-type == 'internal' && 'dapps/W3MWagmi/android/app/build/outputs/apk/internal/app-internal.apk' || 'dapps/W3MWagmi/android/app/build/outputs/apk/release/app-release.apk' }} + upload-to-bucket: ${{ inputs.e2e-build }} + secrets: + env-file: ${{ secrets.APPKIT_ENV_FILE }} + sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }} + secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} + firebase-app-id: ${{ inputs.release-type == 'internal' && secrets.W3M_WAGMI_ANDROID_INTERNAL_FIREBASE_APP_ID || secrets.APPKIT_ANDROID_PROD_FIREBASE_APP_ID }} + gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} + keystore-name: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE_NAME || vars.WC_PROD_KEYSTORE_NAME }} + keystore: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE || secrets.WC_PROD_KEYSTORE }} + aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + firebase-url: ${{ inputs.release-type == 'internal' && vars.FIREBASE_APPKIT_INTERNAL_URL || vars.FIREBASE_APPKIT_PROD_URL }} + + release-ios: + if: ${{ inputs.platform == 'ios' }} + uses: ./.github/workflows/release-ios-base.yaml + with: + name: AppKit React Native + root-path: 'dapps/W3MWagmi' + release-type: ${{ inputs.release-type }} + scheme-name: ${{ inputs.release-type == 'internal' && 'W3MWagmi Internal' || 'W3MWagmi' }} + bundle-id: ${{ inputs.release-type == 'internal' && 'com.walletconnect.web3modal.rnsample.internal' || 'com.walletconnect.web3modal.rnsample' }} + apple-id: ${{ inputs.release-type == 'internal' && '6479817037' || '6446700301' }} + project-type: 'dapp' + build-for-simulator: ${{ inputs.e2e-build }} + upload-to-bucket: ${{ inputs.e2e-build }} + secrets: + env-file: ${{ secrets.APPKIT_ENV_FILE }} + sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }} + apple-username: ${{ secrets.APPLE_USERNAME }} + apple-key-id: ${{ secrets.APPLE_KEY_ID }} + apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} + apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} + match-username: ${{ secrets.MATCH_USERNAME }} + match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} + match-git-url: ${{ secrets.MATCH_GIT_URL }} + match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} + aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + testflight-url: ${{ inputs.release-type == 'internal' && vars.TESTFLIGHT_APPKIT_INTERNAL_URL || vars.TESTFLIGHT_APPKIT_PROD_URL }} diff --git a/.github/workflows/release-dapp-android-internal.yaml b/.github/workflows/release-dapp-android-internal.yaml deleted file mode 100644 index 0028bbdb..00000000 --- a/.github/workflows/release-dapp-android-internal.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: release-android-appkit-internal - -permissions: - id-token: write - contents: read - -on: workflow_dispatch - -jobs: - release-internal: - uses: ./.github/workflows/release-android-base.yaml - with: - name: AppKit React Native - root-path: 'dapps/W3MWagmi' - release-type: 'internal' - project-type: 'dapp' - output-path: 'dapps/W3MWagmi/android/app/build/outputs/apk/internal/app-internal.apk' - upload-to-bucket: true - secrets: - project-id: ${{ vars.APPKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3M_WAGMI_SENTRY_DSN }} - sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }} - secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} - firebase-app-id: ${{ secrets.W3M_WAGMI_ANDROID_INTERNAL_FIREBASE_APP_ID }} - gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} - keystore-name: ${{ secrets.WC_INTERNAL_KEYSTORE_NAME }} - keystore: ${{ secrets.WC_INTERNAL_KEYSTORE }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - firebase-url: ${{ vars.FIREBASE_APPKIT_INTERNAL_URL }} \ No newline at end of file diff --git a/.github/workflows/release-dapp-android-production.yaml b/.github/workflows/release-dapp-android-production.yaml deleted file mode 100644 index 893ff8de..00000000 --- a/.github/workflows/release-dapp-android-production.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: release-android-appkit-production - -permissions: - id-token: write - contents: read - -on: workflow_dispatch - -jobs: - release-production: - uses: ./.github/workflows/release-android-base.yaml - with: - name: AppKit React Native - root-path: 'dapps/W3MWagmi' - release-type: 'production' - project-type: 'dapp' - output-path: 'dapps/W3MWagmi/android/app/build/outputs/apk/release/app-release.apk' - secrets: - project-id: ${{ vars.APPKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3M_WAGMI_SENTRY_DSN }} - sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }} - secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} - firebase-app-id: ${{ secrets.APPKIT_ANDROID_PROD_FIREBASE_APP_ID }} - gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} - keystore-name: ${{ vars.WC_PROD_KEYSTORE_NAME }} - keystore: ${{ secrets.WC_PROD_KEYSTORE }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - firebase-url: ${{ vars.FIREBASE_APPKIT_PROD_URL }} diff --git a/.github/workflows/release-dapp-ios-internal.yaml b/.github/workflows/release-dapp-ios-internal.yaml deleted file mode 100644 index 866f07df..00000000 --- a/.github/workflows/release-dapp-ios-internal.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: release-ios-appkit-internal - -permissions: - id-token: write - contents: read - -on: - workflow_dispatch: - inputs: - build-for-simulator: - description: "Build for simulator instead of TestFlight" - required: false - default: false - type: boolean - -jobs: - release-internal: - uses: ./.github/workflows/release-ios-base.yaml - with: - name: AppKit React Native - root-path: 'dapps/W3MWagmi' - release-type: 'internal' - scheme-name: 'W3MWagmi Internal' - bundle-id: 'com.walletconnect.web3modal.rnsample.internal' - apple-id: '6479817037' - project-type: 'dapp' - build-for-simulator: ${{ inputs.build-for-simulator }} - upload-to-bucket: ${{ inputs.build-for-simulator }} - secrets: - project-id: ${{ vars.APPKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3M_WAGMI_SENTRY_DSN }} - sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }} - apple-username: ${{ secrets.APPLE_USERNAME }} - apple-key-id: ${{ secrets.APPLE_KEY_ID }} - apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} - apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} - match-username: ${{ secrets.MATCH_USERNAME }} - match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - match-git-url: ${{ secrets.MATCH_GIT_URL }} - match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - testflight-url: ${{ vars.TESTFLIGHT_APPKIT_INTERNAL_URL }} - diff --git a/.github/workflows/release-dapp-ios-production.yaml b/.github/workflows/release-dapp-ios-production.yaml deleted file mode 100644 index 900c112b..00000000 --- a/.github/workflows/release-dapp-ios-production.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: release-ios-appkit-production - -permissions: - id-token: write - contents: read - -on: - workflow_dispatch: - inputs: - build-for-simulator: - description: "Build for simulator instead of TestFlight" - required: false - default: false - type: boolean - -jobs: - release-production: - uses: ./.github/workflows/release-ios-base.yaml - with: - name: AppKit React Native - root-path: 'dapps/W3MWagmi' - release-type: 'production' - scheme-name: 'W3MWagmi' - bundle-id: 'com.walletconnect.web3modal.rnsample' - apple-id: '6446700301' - project-type: 'dapp' - secrets: - project-id: ${{ vars.APPKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3M_WAGMI_SENTRY_DSN }} - sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }} - apple-username: ${{ secrets.APPLE_USERNAME }} - apple-key-id: ${{ secrets.APPLE_KEY_ID }} - apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} - apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} - match-username: ${{ secrets.MATCH_USERNAME }} - match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - match-git-url: ${{ secrets.MATCH_GIT_URL }} - match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - testflight-url: ${{ vars.TESTFLIGHT_APPKIT_PROD_URL }} - diff --git a/.github/workflows/release-ios-base.yaml b/.github/workflows/release-ios-base.yaml index 3edbf5a5..57af52a9 100644 --- a/.github/workflows/release-ios-base.yaml +++ b/.github/workflows/release-ios-base.yaml @@ -39,10 +39,6 @@ on: required: false default: false type: boolean - env-file-path: - description: "Path + name of the env file" - required: false - type: string upload-to-bucket: description: "Upload to S3" required: false @@ -63,14 +59,6 @@ on: default: false type: boolean secrets: - project-id: - description: "WalletConnect Cloud ID" - required: true - relay-url: - description: "WalletConnect Relay URL" - required: false - sentry-dsn: - required: false sentry-file: required: true apple-username: @@ -168,13 +156,18 @@ jobs: # Create env file - name: Create env file run: | - ENV_FILE_CONTENT="${{ secrets.env-file }}" - ENV_FILE_PATH="${{ inputs.env-file-path }}" - if [ -n "$ENV_FILE_CONTENT" ] && [ -n "$ENV_FILE_PATH" ]; then - echo "$ENV_FILE_CONTENT" > "$ENV_FILE_PATH" - else - touch ${{ inputs.root-path }}/.env.${{ inputs.release-type }} - echo -e "ENV_PROJECT_ID=${{ secrets.project-id }}\nENV_RELAY_URL=${{ secrets.relay-url }}\nENV_SENTRY_DSN=${{ secrets.sentry-dsn }}\nENV_SENTRY_TAG=${{ inputs.release-type }}" >> ${{ inputs.root-path }}/.env.${{ inputs.release-type }} + if [ -z "${{ secrets.env-file }}" ]; then + echo "Error: env-file secret is empty or not set" + exit 1 + fi + echo "${{ secrets.env-file }}" > ${{ inputs.root-path }}/.env + + - name: Copy variant files + run: | + cd ${{ inputs.root-path }} + if [ -f "./scripts/copy-variant-files.sh" ]; then + chmod +x ./scripts/copy-variant-files.sh + ./scripts/copy-variant-files.sh ${{ inputs.release-type }} fi # Create sentry file diff --git a/.github/workflows/release-pos-android.yaml b/.github/workflows/release-pos-android.yaml deleted file mode 100644 index 1de6499e..00000000 --- a/.github/workflows/release-pos-android.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: release-android-mobilepos - -permissions: - id-token: write - contents: read - -on: - workflow_dispatch: - push: - tags: - - 'variant-*' - -jobs: - release: - uses: ./.github/workflows/release-android-base.yaml - with: - name: Mobile POS React Native - root-path: 'dapps/pos-app' - release-type: 'production' - project-type: 'dapp' - output-path: 'dapps/pos-app/android/app/build/outputs/apk/release/app-release.apk' - env-file-path: 'dapps/pos-app/.env' - package-manager: 'npm' - is-expo-project: true - secrets: - project-id: ${{ vars.POS_APP_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.POS_SENTRY_DSN }} - sentry-file: ${{ secrets.POS_SENTRY_FILE }} - env-file: ${{ vars.POS_ENV_FILE }} - secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} - firebase-app-id: ${{ secrets.POS_ANDROID_FIREBASE_APP_ID }} - gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} - keystore-name: ${{ vars.WC_PROD_KEYSTORE_NAME }} - keystore: ${{ secrets.WC_PROD_KEYSTORE }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - firebase-url: ${{ vars.FIREBASE_POS_URL }} \ No newline at end of file diff --git a/.github/workflows/release-pos-ios-legacy.yaml b/.github/workflows/release-pos-ios-legacy.yaml deleted file mode 100644 index 3acbd0b5..00000000 --- a/.github/workflows/release-pos-ios-legacy.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: release-ios-legacy-mobilepos - -permissions: - id-token: write - contents: read - -on: workflow_dispatch - -jobs: - release: - uses: ./.github/workflows/release-ios-base.yaml - with: - name: Mobile POS React Native (legacy-poc) - root-path: 'dapps/pos-app' - release-type: 'production' - scheme-name: 'WPay' - bundle-id: 'com.reown.mobilepos' - apple-id: '6754570257' - project-type: 'dapp' - env-file-path: 'dapps/pos-app/.env' - package-manager: 'npm' - testflight-groups: 'External' - is-expo-project: true - secrets: - project-id: ${{ vars.POS_APP_PROJECT_ID }} - sentry-file: ${{ secrets.POS_SENTRY_FILE }} - env-file: ${{ vars.POS_LEGACY_ENV_FILE }} - apple-username: ${{ secrets.APPLE_USERNAME }} - apple-key-id: ${{ secrets.APPLE_KEY_ID }} - apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} - apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} - match-username: ${{ secrets.MATCH_USERNAME }} - match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - match-git-url: ${{ secrets.MATCH_GIT_URL }} - match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} - google-services-file: ${{ secrets.POS_IOS_GOOGLE_SERVICES_FILE_BASE64 }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - testflight-url: ${{ vars.TESTFLIGHT_POS_URL }} diff --git a/.github/workflows/release-pos-ios.yaml b/.github/workflows/release-pos-ios.yaml deleted file mode 100644 index c3712de7..00000000 --- a/.github/workflows/release-pos-ios.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: release-ios-mobilepos - -permissions: - id-token: write - contents: read - -on: workflow_dispatch - -jobs: - release: - uses: ./.github/workflows/release-ios-base.yaml - with: - name: Mobile POS React Native - root-path: 'dapps/pos-app' - release-type: 'production' - scheme-name: 'WPay' - bundle-id: 'com.reown.mobilepos' - apple-id: '6754570257' - project-type: 'dapp' - env-file-path: 'dapps/pos-app/.env' - package-manager: 'npm' - testflight-groups: 'External' - is-expo-project: true - secrets: - project-id: ${{ vars.POS_APP_PROJECT_ID }} - sentry-file: ${{ secrets.POS_SENTRY_FILE }} - env-file: ${{ vars.POS_ENV_FILE }} - apple-username: ${{ secrets.APPLE_USERNAME }} - apple-key-id: ${{ secrets.APPLE_KEY_ID }} - apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} - apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} - match-username: ${{ secrets.MATCH_USERNAME }} - match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - match-git-url: ${{ secrets.MATCH_GIT_URL }} - match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} - google-services-file: ${{ secrets.POS_IOS_GOOGLE_SERVICES_FILE_BASE64 }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - testflight-url: ${{ vars.TESTFLIGHT_POS_URL }} diff --git a/.github/workflows/release-pos-legacy-android.yaml b/.github/workflows/release-pos-legacy-android.yaml deleted file mode 100644 index 6fbe7c68..00000000 --- a/.github/workflows/release-pos-legacy-android.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: release-android-legacy-mobilepos - -permissions: - id-token: write - contents: read - -on: - workflow_dispatch: - push: - tags: - - 'variant-*' - -jobs: - release: - uses: ./.github/workflows/release-android-base.yaml - with: - name: Mobile POS React Native (legacy-poc) - root-path: 'dapps/pos-app' - release-type: 'production' - project-type: 'dapp' - output-path: 'dapps/pos-app/android/app/build/outputs/apk/release/app-release.apk' - env-file-path: 'dapps/pos-app/.env' - package-manager: 'npm' - is-expo-project: true - secrets: - project-id: ${{ vars.POS_APP_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.POS_SENTRY_DSN }} - sentry-file: ${{ secrets.POS_SENTRY_FILE }} - env-file: ${{ vars.POS_LEGACY_ENV_FILE }} - secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} - firebase-app-id: ${{ secrets.POS_ANDROID_FIREBASE_APP_ID }} - gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} - keystore-name: ${{ vars.WC_PROD_KEYSTORE_NAME }} - keystore: ${{ secrets.WC_PROD_KEYSTORE }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - firebase-url: ${{ vars.FIREBASE_POS_URL }} \ No newline at end of file diff --git a/.github/workflows/release-pos.yaml b/.github/workflows/release-pos.yaml index eddbba68..987db503 100644 --- a/.github/workflows/release-pos.yaml +++ b/.github/workflows/release-pos.yaml @@ -1,7 +1,9 @@ -# Stub workflow to enable dispatch from feature branches -# Real implementation is on chore/ci-improvements branch name: Release Mobile POS +permissions: + id-token: write + contents: read + on: workflow_dispatch: inputs: @@ -19,9 +21,59 @@ on: options: - production - legacy + push: + tags: + - 'variant-*' jobs: - stub: - runs-on: ubuntu-latest - steps: - - run: echo "This is a stub. Run from feature branch with --ref" + release-android: + if: ${{ github.event_name == 'push' || inputs.platform == 'android' }} + uses: ./.github/workflows/release-android-base.yaml + with: + name: ${{ github.event_name == 'push' && 'Mobile POS React Native' || (inputs.variant == 'legacy' && 'Mobile POS React Native (legacy-poc)' || 'Mobile POS React Native') }} + root-path: 'dapps/pos-app' + release-type: 'production' + project-type: 'dapp' + output-path: 'dapps/pos-app/android/app/build/outputs/apk/release/app-release.apk' + package-manager: 'npm' + is-expo-project: true + secrets: + env-file: ${{ github.event_name == 'push' && secrets.POS_ENV_FILE || (inputs.variant == 'legacy' && secrets.POS_LEGACY_ENV_FILE || secrets.POS_ENV_FILE) }} + sentry-file: ${{ secrets.POS_SENTRY_FILE }} + secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} + firebase-app-id: ${{ secrets.POS_ANDROID_FIREBASE_APP_ID }} + gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} + keystore-name: ${{ vars.WC_PROD_KEYSTORE_NAME }} + keystore: ${{ secrets.WC_PROD_KEYSTORE }} + aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + firebase-url: ${{ vars.FIREBASE_POS_URL }} + + release-ios: + if: ${{ github.event_name != 'push' && inputs.platform == 'ios' }} + uses: ./.github/workflows/release-ios-base.yaml + with: + name: ${{ inputs.variant == 'legacy' && 'Mobile POS React Native (legacy-poc)' || 'Mobile POS React Native' }} + root-path: 'dapps/pos-app' + release-type: 'production' + scheme-name: 'WPay' + bundle-id: 'com.reown.mobilepos' + apple-id: '6754570257' + project-type: 'dapp' + package-manager: 'npm' + testflight-groups: 'External' + is-expo-project: true + secrets: + env-file: ${{ inputs.variant == 'legacy' && secrets.POS_LEGACY_ENV_FILE || secrets.POS_ENV_FILE }} + sentry-file: ${{ secrets.POS_SENTRY_FILE }} + apple-username: ${{ secrets.APPLE_USERNAME }} + apple-key-id: ${{ secrets.APPLE_KEY_ID }} + apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} + apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} + match-username: ${{ secrets.MATCH_USERNAME }} + match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} + match-git-url: ${{ secrets.MATCH_GIT_URL }} + match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} + google-services-file: ${{ secrets.POS_IOS_GOOGLE_SERVICES_FILE_BASE64 }} + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + testflight-url: ${{ vars.TESTFLIGHT_POS_URL }} diff --git a/.github/workflows/release-wallet-android-internal.yaml b/.github/workflows/release-wallet-android-internal.yaml deleted file mode 100644 index d6b4952a..00000000 --- a/.github/workflows/release-wallet-android-internal.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: release-android-walletkit-internal - -permissions: - id-token: write - contents: read - -on: workflow_dispatch - -jobs: - release-internal: - uses: ./.github/workflows/release-android-base.yaml - with: - name: WalletKit React Native - root-path: 'wallets/rn_cli_wallet' - release-type: 'internal' - project-type: 'wallet' - output-path: 'wallets/rn_cli_wallet/android/app/build/outputs/apk/internal/app-internal.apk' - upload-to-bucket: true - secrets: - project-id: ${{ vars.WALLETKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3W_SENTRY_DSN }} - sentry-file: ${{ secrets.W3W_SENTRY_FILE }} - secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} - firebase-app-id: ${{ secrets.W3W_ANDROID_INTERNAL_FIREBASE_APP_ID }} - gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} - keystore-name: ${{ secrets.WC_INTERNAL_KEYSTORE_NAME }} - keystore: ${{ secrets.WC_INTERNAL_KEYSTORE }} - google-services-file: ${{ secrets.ANDROID_GOOGLE_SERVICES_BASE64 }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - firebase-url: ${{ vars.FIREBASE_WALLETKIT_INTERNAL_URL }} diff --git a/.github/workflows/release-wallet-android-production.yaml b/.github/workflows/release-wallet-android-production.yaml deleted file mode 100644 index eac0fc6e..00000000 --- a/.github/workflows/release-wallet-android-production.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: release-android-walletkit-production - -permissions: - id-token: write - contents: read - -on: workflow_dispatch - -jobs: - release-production: - uses: ./.github/workflows/release-android-base.yaml - with: - name: WalletKit React Native - root-path: 'wallets/rn_cli_wallet' - release-type: 'production' - project-type: 'wallet' - output-path: 'wallets/rn_cli_wallet/android/app/build/outputs/apk/release/app-release.apk' - secrets: - project-id: ${{ vars.WALLETKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3W_SENTRY_DSN }} - sentry-file: ${{ secrets.W3W_SENTRY_FILE }} - secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} - firebase-app-id: ${{ secrets.W3W_ANDROID_PROD_FIREBASE_APP_ID }} - gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} - keystore-name: ${{ vars.WC_PROD_KEYSTORE_NAME }} - keystore: ${{ secrets.WC_PROD_KEYSTORE }} - google-services-file: ${{ secrets.ANDROID_GOOGLE_SERVICES_BASE64 }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - firebase-url: ${{ vars.FIREBASE_WALLETKIT_PROD_URL }} diff --git a/.github/workflows/release-wallet-ios-internal.yaml b/.github/workflows/release-wallet-ios-internal.yaml deleted file mode 100644 index 31824652..00000000 --- a/.github/workflows/release-wallet-ios-internal.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: release-ios-walletkit-internal - -permissions: - id-token: write - contents: read - -on: - workflow_dispatch: - inputs: - build-for-simulator: - description: "Build for simulator instead of TestFlight" - required: false - default: false - type: boolean - -jobs: - release-internal: - uses: ./.github/workflows/release-ios-base.yaml - with: - name: WalletKit React Native - root-path: 'wallets/rn_cli_wallet' - release-type: 'internal' - scheme-name: 'RNWallet-Internal' - bundle-id: 'com.walletconnect.web3wallet.rnsample.internal' - apple-id: '6499165794' - project-type: 'wallet' - build-for-simulator: ${{ inputs.build-for-simulator }} - upload-to-bucket: ${{ inputs.build-for-simulator }} - secrets: - project-id: ${{ vars.WALLETKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3W_SENTRY_DSN }} - sentry-file: ${{ secrets.W3W_SENTRY_FILE }} - apple-username: ${{ secrets.APPLE_USERNAME }} - apple-key-id: ${{ secrets.APPLE_KEY_ID }} - apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} - apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} - match-username: ${{ secrets.MATCH_USERNAME }} - match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - match-git-url: ${{ secrets.MATCH_GIT_URL }} - match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} - google-services-file: ${{ secrets.W3W_IOS_INTERNAL_GOOGLE_SERVICES_FILE }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - testflight-url: ${{ vars.TESTFLIGHT_WALLETKIT_INTERNAL_URL }} diff --git a/.github/workflows/release-wallet-ios-production.yaml b/.github/workflows/release-wallet-ios-production.yaml deleted file mode 100644 index e4015916..00000000 --- a/.github/workflows/release-wallet-ios-production.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: release-ios-walletkit-production - -permissions: - id-token: write - contents: read - -on: - workflow_dispatch: - inputs: - build-for-simulator: - description: "Build for simulator instead of TestFlight" - required: false - default: false - type: boolean - -jobs: - release-production: - uses: ./.github/workflows/release-ios-base.yaml - with: - name: WalletKit React Native - root-path: 'wallets/rn_cli_wallet' - release-type: 'production' - scheme-name: 'RNWallet' - bundle-id: 'com.walletconnect.web3wallet.rnsample' - apple-id: '6449264964' - project-type: 'wallet' - secrets: - project-id: ${{ vars.WALLETKIT_PROJECT_ID }} - relay-url: ${{ secrets.ENV_RELAY_URL }} - sentry-dsn: ${{ secrets.W3W_SENTRY_DSN }} - sentry-file: ${{ secrets.W3W_SENTRY_FILE }} - apple-username: ${{ secrets.APPLE_USERNAME }} - apple-key-id: ${{ secrets.APPLE_KEY_ID }} - apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} - apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} - match-username: ${{ secrets.MATCH_USERNAME }} - match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} - match-git-url: ${{ secrets.MATCH_GIT_URL }} - match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} - google-services-file: ${{ secrets.W3W_IOS_PROD_GOOGLE_SERVICES_FILE }} - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - testflight-url: ${{ vars.TESTFLIGHT_WALLETKIT_PROD_URL }} \ No newline at end of file diff --git a/.github/workflows/release-walletkit.yaml b/.github/workflows/release-walletkit.yaml index f24e645e..cc36cbd6 100644 --- a/.github/workflows/release-walletkit.yaml +++ b/.github/workflows/release-walletkit.yaml @@ -1,7 +1,9 @@ -# Stub workflow to enable dispatch from feature branches -# Real implementation is on chore/ci-improvements branch name: Release WalletKit +permissions: + id-token: write + contents: read + on: workflow_dispatch: inputs: @@ -26,7 +28,54 @@ on: default: false jobs: - stub: - runs-on: ubuntu-latest - steps: - - run: echo "This is a stub. Run from feature branch with --ref" + release-android: + if: ${{ inputs.platform == 'android' }} + uses: ./.github/workflows/release-android-base.yaml + with: + name: WalletKit React Native + root-path: 'wallets/rn_cli_wallet' + release-type: ${{ inputs.release-type }} + project-type: 'wallet' + output-path: ${{ inputs.release-type == 'internal' && 'wallets/rn_cli_wallet/android/app/build/outputs/apk/internal/app-internal.apk' || 'wallets/rn_cli_wallet/android/app/build/outputs/apk/release/app-release.apk' }} + upload-to-bucket: ${{ inputs.e2e-build }} + secrets: + env-file: ${{ secrets.WALLETKIT_ENV_FILE }} + sentry-file: ${{ secrets.W3W_SENTRY_FILE }} + secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }} + firebase-app-id: ${{ inputs.release-type == 'internal' && secrets.W3W_ANDROID_INTERNAL_FIREBASE_APP_ID || secrets.W3W_ANDROID_PROD_FIREBASE_APP_ID }} + gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} + keystore-name: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE_NAME || vars.WC_PROD_KEYSTORE_NAME }} + keystore: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE || secrets.WC_PROD_KEYSTORE }} + google-services-file: ${{ secrets.ANDROID_GOOGLE_SERVICES_BASE64 }} + aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + firebase-url: ${{ inputs.release-type == 'internal' && vars.FIREBASE_WALLETKIT_INTERNAL_URL || vars.FIREBASE_WALLETKIT_PROD_URL }} + + release-ios: + if: ${{ inputs.platform == 'ios' }} + uses: ./.github/workflows/release-ios-base.yaml + with: + name: WalletKit React Native + root-path: 'wallets/rn_cli_wallet' + release-type: ${{ inputs.release-type }} + scheme-name: ${{ inputs.release-type == 'internal' && 'RNWallet-Internal' || 'RNWallet' }} + bundle-id: ${{ inputs.release-type == 'internal' && 'com.walletconnect.web3wallet.rnsample.internal' || 'com.walletconnect.web3wallet.rnsample' }} + apple-id: ${{ inputs.release-type == 'internal' && '6499165794' || '6449264964' }} + project-type: 'wallet' + build-for-simulator: ${{ inputs.e2e-build }} + upload-to-bucket: ${{ inputs.e2e-build }} + secrets: + env-file: ${{ secrets.WALLETKIT_ENV_FILE }} + sentry-file: ${{ secrets.W3W_SENTRY_FILE }} + apple-username: ${{ secrets.APPLE_USERNAME }} + apple-key-id: ${{ secrets.APPLE_KEY_ID }} + apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }} + apple-issuer-id: ${{ secrets.APPLE_ISSUER_ID }} + match-username: ${{ secrets.MATCH_USERNAME }} + match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} + match-git-url: ${{ secrets.MATCH_GIT_URL }} + match-ssh-key: ${{ secrets.MATCH_SSH_KEY }} + google-services-file: ${{ inputs.release-type == 'internal' && secrets.W3W_IOS_INTERNAL_GOOGLE_SERVICES_FILE || secrets.W3W_IOS_PROD_GOOGLE_SERVICES_FILE }} + aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + testflight-url: ${{ inputs.release-type == 'internal' && vars.TESTFLIGHT_WALLETKIT_INTERNAL_URL || vars.TESTFLIGHT_WALLETKIT_PROD_URL }} diff --git a/dapps/W3MWagmi/.env.example b/dapps/W3MWagmi/.env.example index 2df9f3eb..664ccf16 100644 --- a/dapps/W3MWagmi/.env.example +++ b/dapps/W3MWagmi/.env.example @@ -1,10 +1,6 @@ -# create .env.debug, env.internal, env.production files - +# create .env ENV_PROJECT_ID='YOUR_PROJECT_ID' ENV_SENTRY_DSN='' # for android builds. for iOS check xcode.env file SENTRY_DISABLE_AUTO_UPLOAD=true - -# debug, internal, production -ENV_SENTRY_TAG='debug' diff --git a/dapps/W3MWagmi/.gitignore b/dapps/W3MWagmi/.gitignore index dc440f23..218c58b3 100644 --- a/dapps/W3MWagmi/.gitignore +++ b/dapps/W3MWagmi/.gitignore @@ -80,4 +80,5 @@ web-build/ !.yarn/releases !.yarn/sdks !.yarn/versions + .env.local diff --git a/dapps/W3MWagmi/README.md b/dapps/W3MWagmi/README.md index e0358862..72b04475 100644 --- a/dapps/W3MWagmi/README.md +++ b/dapps/W3MWagmi/README.md @@ -17,7 +17,11 @@ In order to build the app successfuly, you'll need some extra files chmod +x ./scripts/copy-sample-files.sh && ./scripts/copy-sample-files.sh ``` -## Step 3: Open .env.debug file and replace **ENV_PROJECT_ID with your [Project ID](https://dashboard.reown.com/) +## Step 3: Configure environment variables + +Open `.env` file and set the following values: +- **ENV_PROJECT_ID**: Your [Project ID](https://dashboard.reown.com/) +- **ENV_SENTRY_DSN** (optional): Get it from your [Sentry dashboard](https://sentry.io/) or run `npx @sentry/wizard@latest -i reactNative` to set up Sentry ## Step 4: Start your Application diff --git a/dapps/W3MWagmi/android/app/build.gradle b/dapps/W3MWagmi/android/app/build.gradle index c9bc2907..3d352aa5 100644 --- a/dapps/W3MWagmi/android/app/build.gradle +++ b/dapps/W3MWagmi/android/app/build.gradle @@ -10,12 +10,7 @@ project.ext.sentryCli = [ apply from: "../../node_modules/@sentry/react-native/sentry.gradle" -project.ext.defaultEnvFile = ".env.debug" -project.ext.envConfigFiles = [ - debug: ".env.debug", - internal: ".env.internal", - release: ".env.production", -] +project.ext.defaultEnvFile = ".env" apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" diff --git a/dapps/W3MWagmi/ios/Podfile.lock b/dapps/W3MWagmi/ios/Podfile.lock index 4795bc9c..73ca0e02 100644 --- a/dapps/W3MWagmi/ios/Podfile.lock +++ b/dapps/W3MWagmi/ios/Podfile.lock @@ -3325,4 +3325,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 9c899e628d77988c8077847789bddbd51840bf57 -COCOAPODS: 1.14.3 +COCOAPODS: 1.16.2 diff --git a/dapps/W3MWagmi/ios/W3MWagmi.xcodeproj/xcshareddata/xcschemes/W3MWagmi Debug.xcscheme b/dapps/W3MWagmi/ios/W3MWagmi.xcodeproj/xcshareddata/xcschemes/W3MWagmi Debug.xcscheme index 42ad34fd..edd7260d 100644 --- a/dapps/W3MWagmi/ios/W3MWagmi.xcodeproj/xcshareddata/xcschemes/W3MWagmi Debug.xcscheme +++ b/dapps/W3MWagmi/ios/W3MWagmi.xcodeproj/xcshareddata/xcschemes/W3MWagmi Debug.xcscheme @@ -10,7 +10,7 @@ ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction"> + scriptText = "cp "${PROJECT_DIR}/../scripts/misc_debug.ts" "${PROJECT_DIR}/../src/utils/misc.ts" "> + scriptText = "cp "${PROJECT_DIR}/../scripts/misc_internal.ts" "${PROJECT_DIR}/../src/utils/misc.ts" "> + title = "Copy variant files" + scriptText = "cp "${PROJECT_DIR}/../scripts/misc_prod.ts" "${PROJECT_DIR}/../src/utils/misc.ts" "> { + // Return empty module for ws - React Native uses native WebSocket + if (moduleName === 'ws' || moduleName.startsWith('ws/')) { + return { + type: 'empty', + }; + } + + return context.resolveRequest(context, moduleName, platform); + }, +}; + +module.exports = config; \ No newline at end of file diff --git a/dapps/W3MWagmi/package.json b/dapps/W3MWagmi/package.json index 2f518a07..3f102270 100644 --- a/dapps/W3MWagmi/package.json +++ b/dapps/W3MWagmi/package.json @@ -23,15 +23,15 @@ "@react-navigation/bottom-tabs": "7.7.0", "@react-navigation/native": "7.1.19", "@react-navigation/native-stack": "7.6.1", - "@reown/appkit-bitcoin-react-native": "0.0.0-develop-20251114183547", - "@reown/appkit-coinbase-react-native": "0.0.0-develop-20251114183547", - "@reown/appkit-react-native": "0.0.0-develop-20251114183547", - "@reown/appkit-solana-react-native": "0.0.0-develop-20251114183547", - "@reown/appkit-wagmi-react-native": "0.0.0-develop-20251114183547", + "@reown/appkit-bitcoin-react-native": "2.0.1", + "@reown/appkit-coinbase-react-native": "2.0.1", + "@reown/appkit-react-native": "2.0.1", + "@reown/appkit-solana-react-native": "2.0.1", + "@reown/appkit-wagmi-react-native": "2.0.1", "@sentry/react-native": "7.3.0", "@solana/web3.js": "^1.98.2", "@tanstack/react-query": "5.62.2", - "@walletconnect/react-native-compat": "2.23.0", + "@walletconnect/react-native-compat": "2.23.1", "bitcoinjs-lib": "7.0.0", "bs58": "6.0.0", "expo": "54.0.20", @@ -49,6 +49,7 @@ "react-native-svg": "15.14.0", "react-native-toast-message": "2.3.3", "react-native-worklets": "^0.5.2", + "stream-browserify": "^3.0.0", "text-encoding": "^0.7.0", "tweetnacl": "1.0.3", "viem": "2.38.5", diff --git a/dapps/W3MWagmi/scripts/copy-sample-files.sh b/dapps/W3MWagmi/scripts/copy-sample-files.sh index 20a8b5c1..6610604c 100755 --- a/dapps/W3MWagmi/scripts/copy-sample-files.sh +++ b/dapps/W3MWagmi/scripts/copy-sample-files.sh @@ -1,5 +1,5 @@ # bash script that copies the mock files to the correct location -cp .env.example .env.debug +cp .env.example .env cp android/app/debug.keystore.mock android/app/debug.keystore cp android/secrets.properties.mock android/secrets.properties diff --git a/dapps/W3MWagmi/scripts/misc_debug.ts b/dapps/W3MWagmi/scripts/misc_debug.ts index b4464cac..120179b9 100644 --- a/dapps/W3MWagmi/scripts/misc_debug.ts +++ b/dapps/W3MWagmi/scripts/misc_debug.ts @@ -11,3 +11,5 @@ export const getMetadata = () => { }, }; }; + +export const SENTRY_TAG = 'debug'; \ No newline at end of file diff --git a/dapps/W3MWagmi/scripts/misc_internal.ts b/dapps/W3MWagmi/scripts/misc_internal.ts index a9eba6ec..9e45c6c2 100644 --- a/dapps/W3MWagmi/scripts/misc_internal.ts +++ b/dapps/W3MWagmi/scripts/misc_internal.ts @@ -11,3 +11,5 @@ export const getMetadata = () => { }, }; }; + +export const SENTRY_TAG = 'internal'; \ No newline at end of file diff --git a/dapps/W3MWagmi/scripts/misc_prod.ts b/dapps/W3MWagmi/scripts/misc_prod.ts index 36faf8e9..9733c7fa 100644 --- a/dapps/W3MWagmi/scripts/misc_prod.ts +++ b/dapps/W3MWagmi/scripts/misc_prod.ts @@ -11,3 +11,5 @@ export const getMetadata = () => { }, }; }; + +export const SENTRY_TAG = 'production'; \ No newline at end of file diff --git a/dapps/W3MWagmi/src/App.tsx b/dapps/W3MWagmi/src/App.tsx index 65ab5536..03c0ff21 100644 --- a/dapps/W3MWagmi/src/App.tsx +++ b/dapps/W3MWagmi/src/App.tsx @@ -23,7 +23,7 @@ import * as Sentry from '@sentry/react-native'; import {NavigationContainer} from '@react-navigation/native'; import {QueryClient, QueryClientProvider} from '@tanstack/react-query'; -import {getMetadata} from '@/utils/misc'; +import {getMetadata, SENTRY_TAG} from '@/utils/misc'; import {RootStackNavigator} from '@/navigators/RootStackNavigator'; import {chains} from '@/utils/WagmiUtils'; import SettingsStore from '@/stores/SettingsStore'; @@ -32,7 +32,7 @@ import { storage } from './utils/StorageUtil'; Sentry.init({ enabled: !__DEV__ && !!Config.ENV_SENTRY_DSN, dsn: Config.ENV_SENTRY_DSN, - environment: Config.ENV_SENTRY_TAG, + environment: SENTRY_TAG, sendDefaultPii: true, // Enable Logs enableLogs: true, diff --git a/dapps/W3MWagmi/src/utils/misc.ts b/dapps/W3MWagmi/src/utils/misc.ts index a9eba6ec..9733c7fa 100644 --- a/dapps/W3MWagmi/src/utils/misc.ts +++ b/dapps/W3MWagmi/src/utils/misc.ts @@ -1,13 +1,15 @@ export const getMetadata = () => { return { - name: 'AppKit + Multichain (internal)', - description: 'AppKit + Multichain (internal)', + name: 'AppKit + Multichain', + description: 'AppKit + Multichain', url: 'https://reown.com/appkit', icons: ['https://avatars.githubusercontent.com/u/179229932'], redirect: { - native: 'w3mwagmisample-internal://', - universal: 'https://lab.reown.com/rn_appkit_internal', + native: 'w3mwagmisample://', + universal: 'https://lab.reown.com/rn_appkit', linkMode: true, }, }; }; + +export const SENTRY_TAG = 'production'; \ No newline at end of file diff --git a/dapps/W3MWagmi/yarn.lock b/dapps/W3MWagmi/yarn.lock index 4e30b15b..3af05f95 100644 --- a/dapps/W3MWagmi/yarn.lock +++ b/dapps/W3MWagmi/yarn.lock @@ -4330,42 +4330,42 @@ __metadata: languageName: node linkType: hard -"@reown/appkit-bitcoin-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-bitcoin-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-bitcoin-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-bitcoin-react-native@npm:2.0.1" dependencies: - "@reown/appkit-common-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-common-react-native": 2.0.1 peerDependencies: "@walletconnect/react-native-compat": ">=2.16.1" react: ">=18" react-native: ">=0.72" - checksum: 7fb20c56b017d630905e4fff3fb94e2e93b2a17c491eda9b1565c3739e9c8093eab72949d502883dd79fde72202fe9fdf4a74a6ec6ede8ecace0ced04313e4f2 + checksum: ffd1b0019f565322395bc8d31fabf547bb6c633634f0e221b717e62a53faaeea8f76da2fadb3d13999012f8cb5ccfabe49c96a9ff37838e5b5cbada70eb81c6c languageName: node linkType: hard -"@reown/appkit-coinbase-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-coinbase-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-coinbase-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-coinbase-react-native@npm:2.0.1" dependencies: - "@reown/appkit-common-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-common-react-native": 2.0.1 peerDependencies: "@coinbase/wallet-mobile-sdk": ">=1.1.2" react: ">=18" react-native: ">=0.72" - checksum: f58d620fd4d57dede540ffa8c17e7dc8ad3e8ac12990312da134b3f86fa5f07fb03c5b9eaddb965385eeff3779b2110c6735aedc06d2ae690e628bd4b1f7c31b + checksum: 6af9aa89f4ac29412c20114e3e289f8d6c1555fab508c1297f518348b42ab0d26065e5bb3c57192b95f3588743098a8095853ba1245a49c3b7b5af314243b03d languageName: node linkType: hard -"@reown/appkit-common-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-common-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-common-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-common-react-native@npm:2.0.1" dependencies: bignumber.js: 9.1.2 dayjs: 1.11.10 peerDependencies: react: ">=18" react-native: ">=0.72" - checksum: 8d9fb7c880a6c1850409eb4491377c5e7bca0225421b898f493cab8b819afdc0c3fa2a46dbb0769f34eab9fc8aab9fddeddfdf627d7c8352f4ee6edd2379c1bd + checksum: db6afc70fbfbff3dba462b9482109aa368d540c5066d78ac6ffc3794bd06feed5acddb9fb61c66545f60deb34c5425ec5741296f71a5da237480eb7a2fce79ce languageName: node linkType: hard @@ -4393,11 +4393,11 @@ __metadata: languageName: node linkType: hard -"@reown/appkit-core-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-core-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-core-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-core-react-native@npm:2.0.1" dependencies: - "@reown/appkit-common-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-common-react-native": 2.0.1 countries-and-timezones: 3.7.2 derive-valtio: 0.2.0 valtio: 2.1.8 @@ -4405,7 +4405,7 @@ __metadata: "@walletconnect/react-native-compat": ">=2.16.1" react: ">=18" react-native: ">=0.72" - checksum: f4c0f89d402e1b0f6d2b75e2cc62cda73abd19b7bc69e9d8a9a141ac2fc873697f404725108618b179ee852125deedf14926d2735239200aa21e9311f5a22f53 + checksum: 2781bad7758a01882865de0947fd36a29879ee4be05f81199b8e2c2fc2560c38b15e31abdff649f7e364061f7b9212062ac47f4b0302fee068d391848ae699b3 languageName: node linkType: hard @@ -4432,13 +4432,13 @@ __metadata: languageName: node linkType: hard -"@reown/appkit-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-react-native@npm:2.0.1" dependencies: - "@reown/appkit-common-react-native": 0.0.0-develop-20251114183547 - "@reown/appkit-core-react-native": 0.0.0-develop-20251114183547 - "@reown/appkit-ui-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-common-react-native": 2.0.1 + "@reown/appkit-core-react-native": 2.0.1 + "@reown/appkit-ui-react-native": 2.0.1 "@walletconnect/universal-provider": 2.21.10 valtio: 2.1.8 peerDependencies: @@ -4448,7 +4448,7 @@ __metadata: react-native: ">=0.72" react-native-safe-area-context: ">=4.4.0" react-native-svg: ">=13.10" - checksum: 73255a71431f9507246d4b8fe60e6b53109ae6e2a8fa5f6c810c33a8a2618e5c0c392f013c934a89ebe8ee5fca596a7e32bffee8782f6e93a5057f4f367ad1f4 + checksum: cf5aba8e494ac2778d2a90658cf287a47d56f4c543c5929d39f0097474412769d9f8706366e4d1fcd618021eb451af71a928d6430a9e6fd76d545c61c01762e8 languageName: node linkType: hard @@ -4466,11 +4466,11 @@ __metadata: languageName: node linkType: hard -"@reown/appkit-solana-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-solana-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-solana-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-solana-react-native@npm:2.0.1" dependencies: - "@reown/appkit-common-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-common-react-native": 2.0.1 "@solana/spl-token": 0.4.13 "@solana/web3.js": 1.98.2 bs58: 6.0.0 @@ -4479,22 +4479,22 @@ __metadata: "@walletconnect/react-native-compat": ">=2.16.1" react: ">=18" react-native: ">=0.72" - checksum: f5d2352fd1c3ea69abb26ea4377b4b5788d566721c51593aba04efd04c2fc6eb6073f369c08f17fe9d9a87a9dfe99db5d23df78ca5cf4edc9def155cd8c22278 + checksum: 47e1881dd8ddf66f3026a84fa5fea5dcca70effb3353f74d8a7fc46adcded47f9892cddf00544b9ab9e87909f29e6f87d188974959222f2d40606fad118c225f languageName: node linkType: hard -"@reown/appkit-ui-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-ui-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-ui-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-ui-react-native@npm:2.0.1" dependencies: - "@reown/appkit-common-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-common-react-native": 2.0.1 polished: 4.3.1 qrcode: 1.5.3 peerDependencies: react: ">=18" react-native: ">=0.72" react-native-svg: ">=13.10" - checksum: 786795ff13e9a258725ff4a6a998a1788899c611994d6532f9f0f77b7f9b366c22ad620b01e8ab382436e0212435c8bed936b5c5dd18774d73021f70c6e24c5a + checksum: 74d4cc71c3ed543e7461cae94419042550337ea96482ed933b786ab0c368f7aff2d12479ab5f532f2bbd91a9663204c8927aba6b2ad67d60935fe15eb5a4a6ea languageName: node linkType: hard @@ -4531,12 +4531,12 @@ __metadata: languageName: node linkType: hard -"@reown/appkit-wagmi-react-native@npm:0.0.0-develop-20251114183547": - version: 0.0.0-develop-20251114183547 - resolution: "@reown/appkit-wagmi-react-native@npm:0.0.0-develop-20251114183547" +"@reown/appkit-wagmi-react-native@npm:2.0.1": + version: 2.0.1 + resolution: "@reown/appkit-wagmi-react-native@npm:2.0.1" dependencies: - "@reown/appkit-common-react-native": 0.0.0-develop-20251114183547 - "@reown/appkit-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-common-react-native": 2.0.1 + "@reown/appkit-react-native": 2.0.1 peerDependencies: "@react-native-community/netinfo": "*" "@walletconnect/react-native-compat": ">=2.16.1" @@ -4545,7 +4545,7 @@ __metadata: react-native-get-random-values: "*" viem: ">=2 <3.0.0" wagmi: ">=2 <3.0.0" - checksum: 3da6be0ccff48b67e3def05192b578e5c0deeed1e1a54b29492f861e976ce9c148030ea871dd02261b5181857fc0f6e3b0aed9ef51f03321f75adcc8e0bc50c1 + checksum: 58b163c958acebbaad9acfc95c762cf4e17f04023e246ee3dfa47160bfeeb541a505fe656491cc221bb18c995f891766576f7a5283fb772a0aa4994e50ba98a0 languageName: node linkType: hard @@ -5812,9 +5812,9 @@ __metadata: languageName: node linkType: hard -"@walletconnect/react-native-compat@npm:2.23.0": - version: 2.23.0 - resolution: "@walletconnect/react-native-compat@npm:2.23.0" +"@walletconnect/react-native-compat@npm:2.23.1": + version: 2.23.1 + resolution: "@walletconnect/react-native-compat@npm:2.23.1" dependencies: events: 3.3.0 fast-text-encoding: 1.0.6 @@ -5828,7 +5828,7 @@ __metadata: peerDependenciesMeta: expo-application: optional: true - checksum: 6dee8efd1be29e4c2f4d9ea58c9b24e6ffeabb6253b9a68f3608398add6e2d8a9adb7af87f13325b2b93c47e4cc53bf6cdcbe25afe3b86f1c6f3e14eb24a5489 + checksum: fc3f2fc3acd4686c0a0703e84cacf1f7f417b6bf2dd333c39b8409d297ebe0bf3c9e0926b6a8c05a60401989a09e91cffe0679573c94aa93ef587e67999766cf languageName: node linkType: hard @@ -9758,7 +9758,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2.0.4, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": +"inherits@npm:2.0.4, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3, inherits@npm:~2.0.4": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 @@ -13753,7 +13753,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": +"readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -14162,18 +14162,18 @@ __metadata: "@react-navigation/bottom-tabs": 7.7.0 "@react-navigation/native": 7.1.19 "@react-navigation/native-stack": 7.6.1 - "@reown/appkit-bitcoin-react-native": 0.0.0-develop-20251114183547 - "@reown/appkit-coinbase-react-native": 0.0.0-develop-20251114183547 - "@reown/appkit-react-native": 0.0.0-develop-20251114183547 - "@reown/appkit-solana-react-native": 0.0.0-develop-20251114183547 - "@reown/appkit-wagmi-react-native": 0.0.0-develop-20251114183547 + "@reown/appkit-bitcoin-react-native": 2.0.1 + "@reown/appkit-coinbase-react-native": 2.0.1 + "@reown/appkit-react-native": 2.0.1 + "@reown/appkit-solana-react-native": 2.0.1 + "@reown/appkit-wagmi-react-native": 2.0.1 "@sentry/react-native": 7.3.0 "@solana/web3.js": ^1.98.2 "@tanstack/react-query": 5.62.2 "@types/jest": ^29.5.13 "@types/react": ^19.1.1 "@types/react-test-renderer": ^19.1.0 - "@walletconnect/react-native-compat": 2.23.0 + "@walletconnect/react-native-compat": 2.23.1 babel-jest: ^29.6.3 babel-plugin-module-resolver: ^5.0.0 bitcoinjs-lib: 7.0.0 @@ -14197,6 +14197,7 @@ __metadata: react-native-toast-message: 2.3.3 react-native-worklets: ^0.5.2 react-test-renderer: 19.1.1 + stream-browserify: ^3.0.0 text-encoding: ^0.7.0 tweetnacl: 1.0.3 typescript: ^5.8.3 @@ -14828,6 +14829,16 @@ __metadata: languageName: node linkType: hard +"stream-browserify@npm:^3.0.0": + version: 3.0.0 + resolution: "stream-browserify@npm:3.0.0" + dependencies: + inherits: ~2.0.4 + readable-stream: ^3.5.0 + checksum: 4c47ef64d6f03815a9ca3874e2319805e8e8a85f3550776c47ce523b6f4c6cd57f40e46ec6a9ab8ad260fde61863c2718f250d3bedb3fe9052444eb9abfd9921 + languageName: node + linkType: hard + "stream-buffers@npm:2.2.x": version: 2.2.0 resolution: "stream-buffers@npm:2.2.0" diff --git a/wallets/rn_cli_wallet/.env.example b/wallets/rn_cli_wallet/.env.example index 95d6ec3a..672f8d77 100644 --- a/wallets/rn_cli_wallet/.env.example +++ b/wallets/rn_cli_wallet/.env.example @@ -1,12 +1,9 @@ -# create .env.debug, env.internal, env.production files +# create .env ENV_PROJECT_ID='39bc93c...' -ENV_RELAY_URL='wss://relay.walletconnect.org' ENV_SENTRY_DSN='' ENV_TON_CENTER_API_KEY='' # for android builds. for iOS check xcode.env file SENTRY_DISABLE_AUTO_UPLOAD=true -# debug, internal, production -ENV_SENTRY_TAG='debug' diff --git a/wallets/rn_cli_wallet/README.md b/wallets/rn_cli_wallet/README.md index bba1ce2d..cd0a2224 100644 --- a/wallets/rn_cli_wallet/README.md +++ b/wallets/rn_cli_wallet/README.md @@ -4,6 +4,35 @@ >**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. +## Prerequisites: Ruby Setup (for iOS) + +This project requires **Ruby 3.3.0** for CocoaPods. macOS ships with an outdated system Ruby (2.6) that doesn't work with newer Xcode versions. You'll need to install a modern Ruby version using a version manager like rbenv. + +### Install rbenv and Ruby 3.3.0 + +1. **Install rbenv via Homebrew:** +```bash +brew install rbenv ruby-build +``` + +2. **Initialize rbenv in your shell:** +```bash +echo 'eval "$(rbenv init - zsh)"' >> ~/.zshrc +source ~/.zshrc +``` + +3. **Install Ruby 3.3.0:** +```bash +rbenv install 3.3.0 +``` + +4. **Verify installation** (from the project directory): +```bash +ruby -v # Should show ruby 3.3.0 +``` + +The `.ruby-version` file in this project will automatically tell rbenv to use 3.3.0. + ## Step 1: Install Dependencies ```bash @@ -17,8 +46,12 @@ In order to build the app successfuly, you'll need some extra files chmod +x ./scripts/copy-sample-files.sh && ./scripts/copy-sample-files.sh ``` -## Step 3: Open .env.debug file and replace **ENV_PROJECT_ID with your [Cloud Project ID](https://cloud.reown.com/) +## Step 3: Configure environment variables +Open `.env` file and set the following values: +- **ENV_PROJECT_ID**: Your [Project ID](https://dashboard.reown.com/) +- **ENV_SENTRY_DSN** (optional): Get it from your [Sentry dashboard](https://sentry.io/) or run `npx @sentry/wizard@latest -i reactNative` to set up Sentry +- **ENV_TON_CENTER_API_KEY** (optional): Your [TON Center API key](https://toncenter.com/) for TON blockchain support ## Step 4: Start your Application diff --git a/wallets/rn_cli_wallet/android/app/build.gradle b/wallets/rn_cli_wallet/android/app/build.gradle index dc85be2b..3391c597 100644 --- a/wallets/rn_cli_wallet/android/app/build.gradle +++ b/wallets/rn_cli_wallet/android/app/build.gradle @@ -4,12 +4,7 @@ apply plugin: "org.jetbrains.kotlin.android" apply plugin: "com.facebook.react" apply plugin: "com.google.gms.google-services" -project.ext.defaultEnvFile = ".env.debug" -project.ext.envConfigFiles = [ - debug: ".env.debug", - internal: ".env.internal", - release: ".env.production", -] +project.ext.defaultEnvFile = ".env" apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" diff --git a/wallets/rn_cli_wallet/declarations.d.ts b/wallets/rn_cli_wallet/declarations.d.ts index 4b7d4297..e8671ab0 100644 --- a/wallets/rn_cli_wallet/declarations.d.ts +++ b/wallets/rn_cli_wallet/declarations.d.ts @@ -4,9 +4,7 @@ declare module '*.webp'; declare module 'react-native-config' { export interface NativeConfig { ENV_PROJECT_ID: string; - ENV_RELAY_URL: string; ENV_SENTRY_DSN: string; - ENV_SENTRY_TAG: string; ENV_TON_CENTER_API_KEY: string; } diff --git a/wallets/rn_cli_wallet/ios/Podfile.lock b/wallets/rn_cli_wallet/ios/Podfile.lock index c23f5a0c..7d72b0fc 100644 --- a/wallets/rn_cli_wallet/ios/Podfile.lock +++ b/wallets/rn_cli_wallet/ios/Podfile.lock @@ -1783,7 +1783,7 @@ PODS: - React-RCTFBReactNativeSpec - ReactCommon/turbomodule/core - SocketRocket - - react-native-compat (2.23.0): + - react-native-compat (2.23.1): - boost - DoubleConversion - fast_float @@ -3100,7 +3100,7 @@ SPEC CHECKSUMS: React-logger: 30adf849117e87cf86e88dca1824bb0f18f87e10 React-Mapbuffer: 499069c3dcd4b438a70fcc2a65e8a4185ea9170b React-microtasksnativemodule: f0238469cb9894fd18c419137d312665b8fc05b3 - react-native-compat: baac2e018250ad367b9461e90362c3dcaec14eac + react-native-compat: c8cacd35c0caa120cee536c864bc0a41763fa26a react-native-config: 644074ab88db883fcfaa584f03520ec29589d7df react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba react-native-mmkv: ac7507625cd74bac0eb5333604a7cd7b08fe9e3e @@ -3155,4 +3155,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 37b3abb743131d0d701e76db155ef06d7f5954ad -COCOAPODS: 1.14.3 +COCOAPODS: 1.16.2 diff --git a/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet-Debug.xcscheme b/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet-Debug.xcscheme index 09e2bea4..d09101b7 100644 --- a/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet-Debug.xcscheme +++ b/wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet-Debug.xcscheme @@ -6,22 +6,6 @@ parallelizeBuildables = "YES" buildImplicitDependencies = "YES"> - - - - - - - - - - - - - - - - - - - - - - - - { }, }; }; + +export const SENTRY_TAG = 'debug'; diff --git a/wallets/rn_cli_wallet/scripts/misc_internal.ts b/wallets/rn_cli_wallet/scripts/misc_internal.ts index e1036292..0b4da696 100644 --- a/wallets/rn_cli_wallet/scripts/misc_internal.ts +++ b/wallets/rn_cli_wallet/scripts/misc_internal.ts @@ -11,3 +11,5 @@ export const getMetadata = () => { }, }; }; + +export const SENTRY_TAG = 'internal'; \ No newline at end of file diff --git a/wallets/rn_cli_wallet/scripts/misc_prod.ts b/wallets/rn_cli_wallet/scripts/misc_prod.ts index 78542991..f1e35e48 100644 --- a/wallets/rn_cli_wallet/scripts/misc_prod.ts +++ b/wallets/rn_cli_wallet/scripts/misc_prod.ts @@ -11,3 +11,5 @@ export const getMetadata = () => { }, }; }; + +export const SENTRY_TAG = 'production'; \ No newline at end of file diff --git a/wallets/rn_cli_wallet/src/screens/App.tsx b/wallets/rn_cli_wallet/src/screens/App.tsx index aa6e5bdd..1b31622d 100644 --- a/wallets/rn_cli_wallet/src/screens/App.tsx +++ b/wallets/rn_cli_wallet/src/screens/App.tsx @@ -13,11 +13,12 @@ import useWalletKitEventsManager from '@/hooks/useWalletKitEventsManager'; import {walletKit} from '@/utils/WalletKitUtil'; import SettingsStore from '@/store/SettingsStore'; import ModalStore from '@/store/ModalStore'; +import { SENTRY_TAG } from '@/utils/misc'; Sentry.init({ enabled: !__DEV__ && !!Config.ENV_SENTRY_DSN, dsn: Config.ENV_SENTRY_DSN, - environment: Config.ENV_SENTRY_TAG, + environment: SENTRY_TAG, sendDefaultPii: true, // Enable Logs enableLogs: true, diff --git a/wallets/rn_cli_wallet/src/utils/WalletKitUtil.ts b/wallets/rn_cli_wallet/src/utils/WalletKitUtil.ts index d45f9ac1..900e8758 100644 --- a/wallets/rn_cli_wallet/src/utils/WalletKitUtil.ts +++ b/wallets/rn_cli_wallet/src/utils/WalletKitUtil.ts @@ -10,7 +10,7 @@ export async function createWalletKit(relayerRegionURL: string) { const core = new Core({ projectId: Config.ENV_PROJECT_ID, storage, - relayUrl: relayerRegionURL ?? Config.ENV_RELAY_URL, + relayUrl: relayerRegionURL || undefined, }); walletKit = await WalletKit.init({ core, diff --git a/wallets/rn_cli_wallet/src/utils/misc.ts b/wallets/rn_cli_wallet/src/utils/misc.ts index 78542991..f1e35e48 100644 --- a/wallets/rn_cli_wallet/src/utils/misc.ts +++ b/wallets/rn_cli_wallet/src/utils/misc.ts @@ -11,3 +11,5 @@ export const getMetadata = () => { }, }; }; + +export const SENTRY_TAG = 'production'; \ No newline at end of file diff --git a/wallets/rn_cli_wallet/yarn.lock b/wallets/rn_cli_wallet/yarn.lock index 31340897..2ae07dbc 100644 --- a/wallets/rn_cli_wallet/yarn.lock +++ b/wallets/rn_cli_wallet/yarn.lock @@ -4133,9 +4133,9 @@ __metadata: languageName: node linkType: hard -"@walletconnect/react-native-compat@npm:2.23.0": - version: 2.23.0 - resolution: "@walletconnect/react-native-compat@npm:2.23.0" +"@walletconnect/react-native-compat@npm:2.23.1": + version: 2.23.1 + resolution: "@walletconnect/react-native-compat@npm:2.23.1" dependencies: events: 3.3.0 fast-text-encoding: 1.0.6 @@ -4149,7 +4149,7 @@ __metadata: peerDependenciesMeta: expo-application: optional: true - checksum: 6dee8efd1be29e4c2f4d9ea58c9b24e6ffeabb6253b9a68f3608398add6e2d8a9adb7af87f13325b2b93c47e4cc53bf6cdcbe25afe3b86f1c6f3e14eb24a5489 + checksum: fc3f2fc3acd4686c0a0703e84cacf1f7f417b6bf2dd333c39b8409d297ebe0bf3c9e0926b6a8c05a60401989a09e91cffe0679573c94aa93ef587e67999766cf languageName: node linkType: hard @@ -4320,7 +4320,7 @@ __metadata: "@types/lodash.clonedeep": ^4.5.9 "@types/react": ^19.1.1 "@types/react-test-renderer": ^19.1.0 - "@walletconnect/react-native-compat": 2.23.0 + "@walletconnect/react-native-compat": 2.23.1 babel-plugin-module-resolver: ^5.0.0 bip39: 3.1.0 dayjs: 1.11.11