Using new sentry project thanks for sponsoring

Also removing unnecessary importing public keys
This commit is contained in:
Zhiyuan Zheng 2022-05-16 22:35:58 +02:00
parent d0aa55d021
commit 9c1d18c7f0
5 changed files with 5 additions and 16 deletions

View File

@ -3,9 +3,6 @@ export ENVIRONMENT="development"
export SENTRY_ORGANIZATION="" export SENTRY_ORGANIZATION=""
export SENTRY_PROJECT="" export SENTRY_PROJECT=""
export SENTRY_AUTH_TOKEN="" export SENTRY_AUTH_TOKEN=""
export SENTRY_DSN=""
export TOOOT_PUSH_KEY_PUBLIC=""
# Fastlane start # Fastlane start
export LC_ALL="" export LC_ALL=""

View File

@ -43,8 +43,6 @@ jobs:
SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }} SENTRY_ORGANIZATION: ${{ secrets.SENTRY_ORGANIZATION }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} 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 }} FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}

View File

@ -12,10 +12,6 @@ export default (): ExpoConfig => ({
version: toootVersion, version: toootVersion,
privacy: 'hidden', privacy: 'hidden',
assetBundlePatterns: ['assets/*'], assetBundlePatterns: ['assets/*'],
extra: {
sentryDSN: process.env.SENTRY_DSN,
toootPushKeyPublic: process.env.TOOOT_PUSH_KEY_PUBLIC
},
hooks: { hooks: {
postPublish: [ postPublish: [
{ {

View File

@ -1,14 +1,13 @@
import { isDevelopment } from '@utils/checkEnvironment' import { isRelease } from '@utils/checkEnvironment'
import Constants from 'expo-constants'
import * as Sentry from 'sentry-expo' import * as Sentry from 'sentry-expo'
import log from './log' import log from './log'
const sentry = () => { const sentry = () => {
log('log', 'Sentry', 'initializing') log('log', 'Sentry', 'initializing')
Sentry.init({ Sentry.init({
dsn: Constants.manifest?.extra?.sentryDSN, dsn: 'https://53348b60ff844d52886e90251b3a5f41@o917354.ingest.sentry.io/6410576',
enableInExpoDevelopment: false, enableInExpoDevelopment: true,
debug: isDevelopment debug: !isRelease
}) })
} }

View File

@ -3,7 +3,6 @@ import apiTooot, { TOOOT_API_DOMAIN } from '@api/tooot'
import i18n from '@root/i18n/i18n' import i18n from '@root/i18n/i18n'
import { RootState } from '@root/store' import { RootState } from '@root/store'
import { getInstance, Instance } from '@utils/slices/instancesSlice' import { getInstance, Instance } from '@utils/slices/instancesSlice'
import Constants from 'expo-constants'
import * as Notifications from 'expo-notifications' import * as Notifications from 'expo-notifications'
import * as Random from 'expo-random' import * as Random from 'expo-random'
import { Platform } from 'react-native' import { Platform } from 'react-native'
@ -57,7 +56,7 @@ const pushRegister = async (
formData.append('subscription[endpoint]', endpoint) formData.append('subscription[endpoint]', endpoint)
formData.append( formData.append(
'subscription[keys][p256dh]', 'subscription[keys][p256dh]',
Constants.manifest?.extra?.toootPushKeyPublic 'BO3P7Fe/FxPNijeXayVYViCoLicnnACc+a55wzcS0qIjYU++dtAl2XltgEfU5qPuXrFg5rnxBzbwQG4cAmdNLK4='
) )
formData.append('subscription[keys][auth]', auth) formData.append('subscription[keys][auth]', auth)
Object.keys(alerts).map(key => Object.keys(alerts).map(key =>