From 0ec468e80f036ae932565140a66b5f495b73c5f7 Mon Sep 17 00:00:00 2001 From: Erfan Abdi Date: Mon, 13 Sep 2021 12:17:53 +0430 Subject: [PATCH] Update BlueWallet to 6.2.5 (60205) --- metadata/io.bluewallet.bluewallet.yml | 138 ++++++++++- .../bugsnag-6.2.5.patch | 215 ++++++++++++++++++ 2 files changed, 351 insertions(+), 2 deletions(-) create mode 100644 metadata/io.bluewallet.bluewallet/bugsnag-6.2.5.patch diff --git a/metadata/io.bluewallet.bluewallet.yml b/metadata/io.bluewallet.bluewallet.yml index a87806f40b..6aba970073 100644 --- a/metadata/io.bluewallet.bluewallet.yml +++ b/metadata/io.bluewallet.bluewallet.yml @@ -256,7 +256,141 @@ Builds: - mv $$realm$$/react-native/android/src/main/jniLibs/x86_64/librealm.so ../../node_modules/realm/react-native/android/src/main/jniLibs/x86_64/librealm.so ndk: r21e + - versionName: 6.2.5 + versionCode: 60205 + commit: v6.2.5 + subdir: android/app + sudo: + - apt-get update || apt-get update + - apt-get install -y doxygen pkgconf python3-pystache python3-six yasm + - apt-get install -y -t stretch-backports-sloppy libarchive13 + - apt-get install -y -t stretch-backports cmake + - sysctl fs.inotify.max_user_watches=524288 + - sysctl -p + - curl -Lo node.tar.xz https://nodejs.org/dist/v12.18.2/node-v12.18.2-linux-x64.tar.xz + - echo "b8dc634798ee783482c2ae1755bd7dff09d83fa7bb037cdc370b601d0a5e5cbb node.tar.xz" + | sha256sum -c - + - tar xJf node.tar.xz + - cp -a node-v12.18.2-linux-x64/. /usr/local/ + - npm install -g react-native-cli + init: + - sed -i -e '/react-native-rate/d' ../../package.json + - sed -i -e '/react-native-push-notification/d' ../../package.json + - sed -i -e '/push-notification-ios/d' ../../package.json + - npm install + - sed -i 's/$TAG/v6.1.9/' ../../scripts/release-notes.sh + - npm run-script postinstall + patch: + - bugsnag-6.2.5.patch + gradle: + - yes + srclibs: + - realm@v10.7.0 + - rustup@1.23.1 + - sifir-rs-sdk@137ccdb9d65b9cd0e09cf9d33e22026d5d326aa0 + rm: + - node_modules/detox/android/libs/genymotion-api-1.2.0.jar + - node_modules/detox/Detox-android/com/wix/detox/*/detox-*.aar + - node_modules/detox/Detox-android/com/wix/detox/*/detox-*.jar + - node_modules/hermes-engine + - node_modules/jetifier/lib/*.jar + - node_modules/levelup/node_modules/semver/semver.*.gz + - node_modules/levelup/test/data/testdata.bin + - node_modules/react-native/ReactAndroid/src/main/third-party/java/buck-android-support/buck-android-support.jar + - node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier + - node_modules/node-notifier/vendor/notifu/notifu*.exe + - node_modules/node-notifier/vendor/snoreToast/snoretoast-x*.exe + - node_modules/react-native-tor/android/libs/sifir_android.aar + - node_modules/react-native-tor/ios/Libsifir_ios.framework/Libsifir_ios + - node_modules/realm/react-native/ios/realm-js-ios.xcframework/ios-arm64_armv7/librealm-js-ios.a + - node_modules/realm/react-native/ios/realm-js-ios.xcframework/ios-arm64_i386_x86_64-simulator/librealm-js-ios.a + - node_modules/realm/react-native/ios/realm-js-ios.xcframework/ios-arm64_x86_64-maccatalyst/librealm-js-ios.a + - node_modules/realm/vendor/realm-core/tools/cmake/abitest/abitest.a + - node_modules/realm/react-native/android/src/main/jniLibs/x86_64/librealm.so + - node_modules/realm/react-native/android/src/main/jniLibs/arm64-v8a/librealm.so + - node_modules/realm/react-native/android/src/main/jniLibs/armeabi-v7a/librealm.so + - node_modules/realm/react-native/android/src/main/jniLibs/x86/librealm.so + - node_modules/@bugsnag + prebuild: + - sed -i -e '/channel_name/,+30d' src/main/AndroidManifest.xml + - sed -i -e '/splits/,+7d' -e '/google-services/d' -e '/detox/,+2d' -e 's/versionCode + 1/versionCode $$VERCODE$$/' -e '/firebase/d' build.gradle + - sed -i -e 's/http:/https:/' ../../node_modules/react-native-gesture-handler/android/lib/build.gradle + - sed -i -e "/swiperefreshlayout/a implementation(project(':react-native-device-info')) + { exclude group\x3a 'com.google.firebase'\\ exclude group\x3a 'com.google.android.gms'\\ + exclude group\x3a 'com.android.installreferrer'\\ }" build.gradle + - sed -i -e "/swiperefreshlayout/a implementation(project(':react-native-camera')) + { exclude group\x3a 'com.google.firebase'\\ exclude group\x3a 'com.google.android.gms'\\ + }" build.gradle + - sed -i -e '/installReferrerVersion/,+11d' ../../node_modules/react-native-device-info/android/build.gradle + - sed -i -e '/react-native-rate/d' -e '/&& hasGmsSync/,+2d' ../../screen/settings/about.js + - sed -i -e '/react-native-push-notification/d' ../../blue_modules/notifications.js + - sed -i -e "/PushNotificationIOS/d" ../../blue_modules/notifications.js + - sed -i 's/20.1.5948944/21.4.7075529/' ../build.gradle + - cp -r $$sifir-rs-sdk$$ ../.. + scanignore: + - android/build.gradle + - android/app/build.gradle + - node_modules/@react-native-async-storage/async-storage/android/build.gradle + - node_modules/@react-native-community/masked-view/android/build.gradle + - node_modules/detox/android/build.gradle + - node_modules/detox/android/detox/publishing.gradle + - node_modules/jsc-android + - node_modules/lottie-react-native/build.gradle + - node_modules/react-native-blue-crypto/android/build.gradle + - node_modules/react-native-camera/android/build.gradle + - node_modules/react-native-device-info/android/build.gradle + - node_modules/react-native-localize/android/build.gradle + - node_modules/react-native-prompt-android/android/build.gradle + - node_modules/react-native-reanimated/android + - node_modules/react-native-safe-area-context/android/build.gradle + - node_modules/react-native-screens/android/build.gradle + - node_modules/react-native-secure-key-store/example/android/build.gradle + - node_modules/react-native-share/android/build.gradle + - node_modules/react-native-svg/android/build.gradle + - node_modules/react-native-tcp-socket/android/build.gradle + - node_modules/react-native-vector-icons/android/build.gradle + - node_modules/react-native-webview/android/build.gradle + - node_modules/react-native-widget-center/android/build.gradle + - node_modules/react-native-ios-context-menu/android/build.gradle + - node_modules/react-native/android + - node_modules/react-native/template/android/build.gradle + - node_modules/react-native-tor/android/build.gradle + - node_modules/realm/react-native/android/build.gradle + scandelete: + - sifir-rs-sdk + build: + - export ANDROID_NDK=$$NDK$$ + - export ANDROID_SDK=$$SDK$$ + - $ANDROID_HOME/tools/bin/sdkmanager 'cmake;3.10.2.4988404' + - $$rustup$$/rustup-init.sh -y + - source $HOME/.cargo/env + - rustup default stable + - rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android + i686-linux-android + - cargo install cargo-ndk + - export ANDROID_NDK=$$NDK$$ + - cd ../../sifir-rs-sdk/sifir-android + - cargo ndk --platform 30 -t arm64-v8a -t armeabi-v7a -t x86 -t x86_64 -o app/tor/src/main/jniLibs + build -p sifir-android --release + - cd app + - gradle assembleRelease + - cd ../../.. + - mv sifir-rs-sdk/sifir-android/app/tor/build/outputs/aar/tor-release.aar node_modules/react-native-tor/android/libs/sifir_android.aar + - cd android/app + - pushd $$realm$$ + - npm install + - node scripts/build-android.js + - cd .. + - popd + - mv $$realm$$/react-native/android/src/main/jniLibs/arm64-v8a/librealm.so ../../node_modules/realm/react-native/android/src/main/jniLibs/arm64-v8a/librealm.so + - mv $$realm$$/react-native/android/src/main/jniLibs/armeabi-v7a/librealm.so + ../../node_modules/realm/react-native/android/src/main/jniLibs/armeabi-v7a/librealm.so + - mv $$realm$$/react-native/android/src/main/jniLibs/x86/librealm.so ../../node_modules/realm/react-native/android/src/main/jniLibs/x86/librealm.so + - mv $$realm$$/react-native/android/src/main/jniLibs/x86_64/librealm.so ../../node_modules/realm/react-native/android/src/main/jniLibs/x86_64/librealm.so + ndk: r21e + AutoUpdateMode: None UpdateCheckMode: None -CurrentVersion: 6.1.9 -CurrentVersionCode: 60109 +CurrentVersion: 6.2.5 +CurrentVersionCode: 60205 diff --git a/metadata/io.bluewallet.bluewallet/bugsnag-6.2.5.patch b/metadata/io.bluewallet.bluewallet/bugsnag-6.2.5.patch new file mode 100644 index 0000000000..e5de2e8447 --- /dev/null +++ b/metadata/io.bluewallet.bluewallet/bugsnag-6.2.5.patch @@ -0,0 +1,215 @@ +From 3db8ffaf03fd10f96e36d07b85f91bc250ec896a Mon Sep 17 00:00:00 2001 +From: Erfan Abdi +Date: Mon, 13 Sep 2021 11:20:17 +0430 +Subject: [PATCH] Revert "ADD: bugsnag" + +This reverts commit 85dfde6939df647b4f00dd8d4b39f4254ff7081b. +--- + android/app/build.gradle | 6 +---- + android/app/src/main/AndroidManifest.xml | 2 -- + .../bluewallet/MainApplication.java | 2 -- + android/build.gradle | 1 - + blue_modules/analytics.js | 22 ++++++------------- + index.js | 3 --- + ios/BlueWallet/AppDelegate.m | 3 --- + ios/BlueWallet/Info.plist | 5 ----- + package.json | 2 -- + screen/settings/about.js | 2 -- + 10 files changed, 8 insertions(+), 40 deletions(-) + +diff --git a/android/app/build.gradle b/android/app/build.gradle +index 207fb58c..8276bee8 100644 +--- a/android/app/build.gradle ++++ b/android/app/build.gradle +@@ -82,7 +82,6 @@ project.ext.react = [ + ] + + apply from: "../../node_modules/react-native/react.gradle" +-apply plugin: "com.bugsnag.android.gradle" + + /** + * Set this to true to create two separate APKs instead of one: +@@ -222,7 +221,4 @@ task copyDownloadableDepsToLibs(type: Copy) { + } + + apply plugin: 'com.google.gms.google-services' // Google Services plugin +-apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) +-bugsnag { +- uploadReactNativeMappings = true +-} ++apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) +\ No newline at end of file +diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml +index a6e4ba9d..91cc9df3 100644 +--- a/android/app/src/main/AndroidManifest.xml ++++ b/android/app/src/main/AndroidManifest.xml +@@ -93,8 +93,6 @@ + /> + + +- +- + + + +diff --git a/android/app/src/main/java/io/bluewallet/bluewallet/MainApplication.java b/android/app/src/main/java/io/bluewallet/bluewallet/MainApplication.java +index 11c16adf..792d8899 100644 +--- a/android/app/src/main/java/io/bluewallet/bluewallet/MainApplication.java ++++ b/android/app/src/main/java/io/bluewallet/bluewallet/MainApplication.java +@@ -11,7 +11,6 @@ import com.facebook.soloader.SoLoader; + import java.lang.reflect.InvocationTargetException; + import com.facebook.react.modules.i18nmanager.I18nUtil; + import java.util.List; +-import com.bugsnag.android.Bugsnag; + + public class MainApplication extends Application implements ReactApplication { + +@@ -45,7 +44,6 @@ public class MainApplication extends Application implements ReactApplication { + @Override + public void onCreate() { + super.onCreate(); +- Bugsnag.start(this); + I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance(); + sharedI18nUtilInstance.allowRTL(getApplicationContext(), true); + SoLoader.init(this, /* native exopackage */ false); +diff --git a/android/build.gradle b/android/build.gradle +index c7b6f046..f4adf11a 100644 +--- a/android/build.gradle ++++ b/android/build.gradle +@@ -19,7 +19,6 @@ buildscript { + } + dependencies { + classpath('com.android.tools.build:gradle:4.2.2') +- classpath("com.bugsnag:bugsnag-android-gradle-plugin:5.+") + classpath 'com.google.gms:google-services:4.3.10' // Google Services plugin + + +diff --git a/blue_modules/analytics.js b/blue_modules/analytics.js +index 6428fcde..64bd7ad8 100644 +--- a/blue_modules/analytics.js ++++ b/blue_modules/analytics.js +@@ -1,23 +1,13 @@ +-import { getUniqueId } from 'react-native-device-info'; +-import Bugsnag from '@bugsnag/react-native'; + const BlueApp = require('../BlueApp'); + +-let userHasOptedOut = false; +- + if (process.env.NODE_ENV !== 'development') { +- Bugsnag.start({ +- collectUserIp: false, +- user: { +- id: getUniqueId(), +- }, +- onError: function (event) { +- return !userHasOptedOut; +- }, +- }); ++ // nop + } + + BlueApp.isDoNotTrackEnabled().then(value => { +- if (value) userHasOptedOut = true; ++ if (value) { ++ // nop ++ } + }); + + const A = async event => {}; +@@ -33,7 +23,9 @@ A.ENUM = { + }; + + A.setOptOut = value => { +- if (value) userHasOptedOut = true; ++ if (value) { ++ // nop ++ } + }; + + module.exports = A; +diff --git a/index.js b/index.js +index 2a4a84f1..234e6826 100644 +--- a/index.js ++++ b/index.js +@@ -1,12 +1,9 @@ +-import Bugsnag from '@bugsnag/react-native'; +- + import React, { useEffect } from 'react'; + import './shim.js'; + import { AppRegistry } from 'react-native'; + import App from './App'; + import { BlueStorageProvider } from './blue_modules/storage-context'; + import { enableScreens } from 'react-native-screens'; +-Bugsnag.start(); + const A = require('./blue_modules/analytics'); + enableScreens(false); + if (!Error.captureStackTrace) { +diff --git a/ios/BlueWallet/AppDelegate.m b/ios/BlueWallet/AppDelegate.m +index 7a3d3062..f426eccd 100644 +--- a/ios/BlueWallet/AppDelegate.m ++++ b/ios/BlueWallet/AppDelegate.m +@@ -1,4 +1,3 @@ +-#import + /** + * Copyright (c) Facebook, Inc. and its affiliates. + * +@@ -41,8 +40,6 @@ static void InitializeFlipper(UIApplication *application) { + + - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions + { +- [Bugsnag start]; +- + #if !TARGET_OS_MACCATALYST + #ifdef FB_SONARKIT_ENABLED + InitializeFlipper(application); +diff --git a/ios/BlueWallet/Info.plist b/ios/BlueWallet/Info.plist +index 1722c8ee..2eada192 100644 +--- a/ios/BlueWallet/Info.plist ++++ b/ios/BlueWallet/Info.plist +@@ -350,10 +350,5 @@ + + + +- bugsnag +- +- apiKey +- 17ba9059f676f1cc4f45d98182388b01 +- + + +diff --git a/package.json b/package.json +index f9561026..7231b410 100644 +--- a/package.json ++++ b/package.json +@@ -95,8 +95,6 @@ + }, + "dependencies": { + "@babel/preset-env": "7.12.1", +- "@bugsnag/react-native": "7.13.0", +- "@bugsnag/source-maps": "2.3.0", + "@keystonehq/bc-ur-registry": "https://github.com/BlueWallet/ur-registry", + "@ngraveio/bc-ur": "https://github.com/BlueWallet/bc-ur", + "@react-native-async-storage/async-storage": "1.15.5", +diff --git a/screen/settings/about.js b/screen/settings/about.js +index 5420aef7..83898b91 100644 +--- a/screen/settings/about.js ++++ b/screen/settings/about.js +@@ -10,7 +10,6 @@ import { BlueButton, BlueCard, BlueListItem, BlueSpacing20, BlueTextCentered } f + import navigationStyle from '../../components/navigationStyle'; + import loc, { formatStringAddTwoWhiteSpaces } from '../../loc'; + import Clipboard from '@react-native-clipboard/clipboard'; +-import Bugsnag from '@bugsnag/react-native'; + import { BlueStorageContext } from '../../blue_modules/storage-context'; + + const About = () => { +@@ -223,7 +222,6 @@ const About = () => { + accessibilityRole="button" + onPress={() => { + const stringToCopy = 'userId:' + getUniqueId(); +- Bugsnag.notify(new Error('copied unique id')); + Clipboard.setString(stringToCopy); + }} + > +-- +2.29.2 +