From 9c1d18c7f04a9de421cb81f357223828ce9873e6 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Mon, 16 May 2022 22:35:58 +0200 Subject: [PATCH] Using new sentry project thanks for sponsoring Also removing unnecessary importing public keys --- .envrc.example | 3 --- .github/workflows/build.yml | 2 -- app.config.ts | 4 ---- src/startup/sentry.ts | 9 ++++----- src/utils/slices/instances/push/register.ts | 3 +-- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.envrc.example b/.envrc.example index a45f2cc7..fd559adf 100644 --- a/.envrc.example +++ b/.envrc.example @@ -3,9 +3,6 @@ export ENVIRONMENT="development" export SENTRY_ORGANIZATION="" export SENTRY_PROJECT="" export SENTRY_AUTH_TOKEN="" -export SENTRY_DSN="" - -export TOOOT_PUSH_KEY_PUBLIC="" # Fastlane start export LC_ALL="" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91fdb20f..e9fc022b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,8 +43,6 @@ jobs: SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }} SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - TOOOT_PUSH_KEY_PUBLIC: ${{ secrets.TOOOT_PUSH_KEY_PUBLIC }} FASTLANE_USER: ${{ secrets.FASTLANE_USER }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} diff --git a/app.config.ts b/app.config.ts index c0114653..73f78825 100644 --- a/app.config.ts +++ b/app.config.ts @@ -12,10 +12,6 @@ export default (): ExpoConfig => ({ version: toootVersion, privacy: 'hidden', assetBundlePatterns: ['assets/*'], - extra: { - sentryDSN: process.env.SENTRY_DSN, - toootPushKeyPublic: process.env.TOOOT_PUSH_KEY_PUBLIC - }, hooks: { postPublish: [ { diff --git a/src/startup/sentry.ts b/src/startup/sentry.ts index 1c266aaf..507516ca 100644 --- a/src/startup/sentry.ts +++ b/src/startup/sentry.ts @@ -1,14 +1,13 @@ -import { isDevelopment } from '@utils/checkEnvironment' -import Constants from 'expo-constants' +import { isRelease } from '@utils/checkEnvironment' import * as Sentry from 'sentry-expo' import log from './log' const sentry = () => { log('log', 'Sentry', 'initializing') Sentry.init({ - dsn: Constants.manifest?.extra?.sentryDSN, - enableInExpoDevelopment: false, - debug: isDevelopment + dsn: 'https://53348b60ff844d52886e90251b3a5f41@o917354.ingest.sentry.io/6410576', + enableInExpoDevelopment: true, + debug: !isRelease }) } diff --git a/src/utils/slices/instances/push/register.ts b/src/utils/slices/instances/push/register.ts index 67e184fd..8d3f7abc 100644 --- a/src/utils/slices/instances/push/register.ts +++ b/src/utils/slices/instances/push/register.ts @@ -3,7 +3,6 @@ import apiTooot, { TOOOT_API_DOMAIN } from '@api/tooot' import i18n from '@root/i18n/i18n' import { RootState } from '@root/store' import { getInstance, Instance } from '@utils/slices/instancesSlice' -import Constants from 'expo-constants' import * as Notifications from 'expo-notifications' import * as Random from 'expo-random' import { Platform } from 'react-native' @@ -57,7 +56,7 @@ const pushRegister = async ( formData.append('subscription[endpoint]', endpoint) formData.append( 'subscription[keys][p256dh]', - Constants.manifest?.extra?.toootPushKeyPublic + 'BO3P7Fe/FxPNijeXayVYViCoLicnnACc+a55wzcS0qIjYU++dtAl2XltgEfU5qPuXrFg5rnxBzbwQG4cAmdNLK4=' ) formData.append('subscription[keys][auth]', auth) Object.keys(alerts).map(key =>