diff --git a/dist/BUNDLE_ID b/dist/BUNDLE_ID index 37417902..b888aec0 100644 --- a/dist/BUNDLE_ID +++ b/dist/BUNDLE_ID @@ -1 +1 @@ -01965f57-c8ff-73f9-baa1-d6fbbac8f131 \ No newline at end of file +01966cee-74d1-7fec-ba3a-468771bdaf72 \ No newline at end of file diff --git a/hot-updater.config.ts b/hot-updater.config.ts index b5f26d3e..219b8221 100644 --- a/hot-updater.config.ts +++ b/hot-updater.config.ts @@ -1,4 +1,5 @@ import { metro } from '@hot-updater/metro'; +import { withSentry } from "@hot-updater/sentry-plugin"; import {firebaseStorage, firebaseDatabase} from '@hot-updater/firebase'; import * as admin from 'firebase-admin'; import { defineConfig } from 'hot-updater'; @@ -11,8 +12,15 @@ import 'dotenv/config'; const credential = admin.credential.applicationDefault(); export default defineConfig({ - build: metro({ + build: withSentry( + metro({ enableHermes: true, + sourcemap: true + }), + { + org: process.env.SENTRY_ORG, + project: process.env.SENTRY_PROJECT, + authToken: process.env.SENTRY_AUTH_TOKEN!, }), storage: firebaseStorage({ projectId: process.env.HOT_UPDATER_FIREBASE_PROJECT_ID!, diff --git a/metro.config.js b/metro.config.js index 998ca533..e5c8c0e4 100644 --- a/metro.config.js +++ b/metro.config.js @@ -1,4 +1,5 @@ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); +const { withSentryConfig } = require("@sentry/react-native/metro"); /** * Metro configuration @@ -10,4 +11,4 @@ const config = { }; -module.exports = mergeConfig(getDefaultConfig(__dirname), config); +module.exports = withSentryConfig(mergeConfig(getDefaultConfig(__dirname), config)); diff --git a/package.json b/package.json index 376ae58d..22697c0a 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "@babel/runtime": "^7.25.0", "@hot-updater/firebase": "0.16.3", "@hot-updater/metro": "0.16.3", + "@hot-updater/sentry-plugin": "^0.16.3", "@react-native-community/cli": "18.0.0", "@react-native-community/cli-platform-android": "18.0.0", "@react-native-community/cli-platform-ios": "18.0.0", @@ -97,6 +98,7 @@ "@react-native/eslint-config": "0.79.0", "@react-native/metro-config": "0.79.0", "@react-native/typescript-config": "0.79.0", + "@sentry/cli": "^2.43.0", "@tsconfig/react-native": "^3.0.0", "@types/jest": "^29.5.13", "@types/lodash.clonedeep": "^4.5.9", diff --git a/src/App.tsx b/src/App.tsx index bd3ae106..a7b74dc5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -36,7 +36,7 @@ if (!__DEV__) { Sentry.init({ dsn: SENTRY_DSN, environment: APP_ENV, - release: `minibits_wallet_android@${JS_BUNDLE_VERSION}`, + release: Platform.OS === 'android' ? `minibits_wallet_android@${JS_BUNDLE_VERSION}` : `minibits_wallet_ios@${JS_BUNDLE_VERSION}`, dist: ANDROID_VERSION_NAME, beforeSend: function (event, hint) { const exception = hint.originalException diff --git a/src/screens/TokenReceiveScreen.tsx b/src/screens/TokenReceiveScreen.tsx index 7b257374..06b4de9c 100644 --- a/src/screens/TokenReceiveScreen.tsx +++ b/src/screens/TokenReceiveScreen.tsx @@ -91,6 +91,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props) const gotoScan = async function () { tokenInputRef.current?.blur() + //@ts-ignore navigation.navigate('Scan', { mintUrl: mint?.mintUrl, unit @@ -127,6 +128,7 @@ export const TokenReceiveScreen = function TokenReceiveScreen({ route }: Props) const gotoTopup = async function () { + //@ts-ignore navigation.navigate('Topup', { unit, mintUrl: mint?.mintUrl diff --git a/yarn.lock b/yarn.lock index 1de5886f..8b95c10f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3202,6 +3202,18 @@ __metadata: languageName: node linkType: hard +"@hot-updater/sentry-plugin@npm:^0.16.3": + version: 0.16.3 + resolution: "@hot-updater/sentry-plugin@npm:0.16.3" + dependencies: + "@hot-updater/core": 0.16.3 + "@hot-updater/plugin-core": 0.16.3 + peerDependencies: + "@sentry/cli": ">=1.51.1" + checksum: e4df30a9dd6abf62ebbb83989073b3df00b5f885b4f33372e6ec3cc7265303ee093e8112fb6ec609ba0172d4ce46068c4dfd48197a4485d4ee537504a6a1777e + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.13.0": version: 0.13.0 resolution: "@humanwhocodes/config-array@npm:0.13.0" @@ -4607,6 +4619,13 @@ __metadata: languageName: node linkType: hard +"@sentry/cli-darwin@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-darwin@npm:2.43.0" + conditions: os=darwin + languageName: node + linkType: hard + "@sentry/cli-linux-arm64@npm:2.42.4": version: 2.42.4 resolution: "@sentry/cli-linux-arm64@npm:2.42.4" @@ -4614,6 +4633,13 @@ __metadata: languageName: node linkType: hard +"@sentry/cli-linux-arm64@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-linux-arm64@npm:2.43.0" + conditions: (os=linux | os=freebsd) & cpu=arm64 + languageName: node + linkType: hard + "@sentry/cli-linux-arm@npm:2.42.4": version: 2.42.4 resolution: "@sentry/cli-linux-arm@npm:2.42.4" @@ -4621,6 +4647,13 @@ __metadata: languageName: node linkType: hard +"@sentry/cli-linux-arm@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-linux-arm@npm:2.43.0" + conditions: (os=linux | os=freebsd) & cpu=arm + languageName: node + linkType: hard + "@sentry/cli-linux-i686@npm:2.42.4": version: 2.42.4 resolution: "@sentry/cli-linux-i686@npm:2.42.4" @@ -4628,6 +4661,13 @@ __metadata: languageName: node linkType: hard +"@sentry/cli-linux-i686@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-linux-i686@npm:2.43.0" + conditions: (os=linux | os=freebsd) & (cpu=x86 | cpu=ia32) + languageName: node + linkType: hard + "@sentry/cli-linux-x64@npm:2.42.4": version: 2.42.4 resolution: "@sentry/cli-linux-x64@npm:2.42.4" @@ -4635,6 +4675,20 @@ __metadata: languageName: node linkType: hard +"@sentry/cli-linux-x64@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-linux-x64@npm:2.43.0" + conditions: (os=linux | os=freebsd) & cpu=x64 + languageName: node + linkType: hard + +"@sentry/cli-win32-arm64@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-win32-arm64@npm:2.43.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@sentry/cli-win32-i686@npm:2.42.4": version: 2.42.4 resolution: "@sentry/cli-win32-i686@npm:2.42.4" @@ -4642,6 +4696,13 @@ __metadata: languageName: node linkType: hard +"@sentry/cli-win32-i686@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-win32-i686@npm:2.43.0" + conditions: os=win32 & (cpu=x86 | cpu=ia32) + languageName: node + linkType: hard + "@sentry/cli-win32-x64@npm:2.42.4": version: 2.42.4 resolution: "@sentry/cli-win32-x64@npm:2.42.4" @@ -4649,6 +4710,13 @@ __metadata: languageName: node linkType: hard +"@sentry/cli-win32-x64@npm:2.43.0": + version: 2.43.0 + resolution: "@sentry/cli-win32-x64@npm:2.43.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@sentry/cli@npm:2.42.4": version: 2.42.4 resolution: "@sentry/cli@npm:2.42.4" @@ -4686,6 +4754,46 @@ __metadata: languageName: node linkType: hard +"@sentry/cli@npm:^2.43.0": + version: 2.43.0 + resolution: "@sentry/cli@npm:2.43.0" + dependencies: + "@sentry/cli-darwin": 2.43.0 + "@sentry/cli-linux-arm": 2.43.0 + "@sentry/cli-linux-arm64": 2.43.0 + "@sentry/cli-linux-i686": 2.43.0 + "@sentry/cli-linux-x64": 2.43.0 + "@sentry/cli-win32-arm64": 2.43.0 + "@sentry/cli-win32-i686": 2.43.0 + "@sentry/cli-win32-x64": 2.43.0 + https-proxy-agent: ^5.0.0 + node-fetch: ^2.6.7 + progress: ^2.0.3 + proxy-from-env: ^1.1.0 + which: ^2.0.2 + dependenciesMeta: + "@sentry/cli-darwin": + optional: true + "@sentry/cli-linux-arm": + optional: true + "@sentry/cli-linux-arm64": + optional: true + "@sentry/cli-linux-i686": + optional: true + "@sentry/cli-linux-x64": + optional: true + "@sentry/cli-win32-arm64": + optional: true + "@sentry/cli-win32-i686": + optional: true + "@sentry/cli-win32-x64": + optional: true + bin: + sentry-cli: bin/sentry-cli + checksum: 59253998381ac1555e6707ed3162fcc7aa843394b51027d1ae04296616b476b29d87e2c9a8e1cb30d748cede78bdee4a5cf366eafac9724dab0dcd506ccf4ddc + languageName: node + linkType: hard + "@sentry/core@npm:8.54.0": version: 8.54.0 resolution: "@sentry/core@npm:8.54.0" @@ -12193,6 +12301,7 @@ __metadata: "@hot-updater/firebase": 0.16.3 "@hot-updater/metro": 0.16.3 "@hot-updater/react-native": 0.16.3 + "@hot-updater/sentry-plugin": ^0.16.3 "@notifee/react-native": ^9.1.8 "@react-native-clipboard/clipboard": ^1.16.2 "@react-native-community/cli": 18.0.0 @@ -12210,6 +12319,7 @@ __metadata: "@react-navigation/native-stack": ^7.3.3 "@react-navigation/stack": ^7.1.1 "@scure/bip39": 1.5.0 + "@sentry/cli": ^2.43.0 "@sentry/react-native": ^6.10.0 "@tsconfig/react-native": ^3.0.0 "@types/jest": ^29.5.13