diff --git a/.github/workflows/v2explorer.yaml b/.github/workflows/cli-dapp.yaml similarity index 80% rename from .github/workflows/v2explorer.yaml rename to .github/workflows/cli-dapp.yaml index 27f4ead7..2988b231 100644 --- a/.github/workflows/v2explorer.yaml +++ b/.github/workflows/cli-dapp.yaml @@ -1,4 +1,4 @@ -name: v2explorer-android +name: dapp-modal-android on: pull_request: @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: dapps/v2Explorer + working-directory: dapps/ModalUProvider outputs: app: app/build/outputs/apk/release steps: @@ -26,4 +26,4 @@ jobs: - uses: mobile-dev-inc/action-maestro-cloud@v1 with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} - app-file: dapps/v2Explorer/android/app/build/outputs/apk/release/app-release.apk + app-file: dapps/ModalUProvider/android/app/build/outputs/apk/release/app-release.apk diff --git a/.maestro/dapp-flow.yaml b/.maestro/dapp-flow.yaml index 9824dd8e..e6f2fd21 100644 --- a/.maestro/dapp-flow.yaml +++ b/.maestro/dapp-flow.yaml @@ -1,7 +1,7 @@ # flow.yaml -appId: "com.walletconnect.modal.rnviemsample" +appId: "com.walletconnect.modal.rnuprovidersample" --- - launchApp - extendedWaitUntil: visible: "Connect" - timeout: 60000 \ No newline at end of file + timeout: 60000 diff --git a/dapps/ModalEthers/.env.example b/dapps/ModalEthers/.env.example new file mode 100644 index 00000000..b6bba221 --- /dev/null +++ b/dapps/ModalEthers/.env.example @@ -0,0 +1 @@ +ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://cloud.walletconnect.com/ \ No newline at end of file diff --git a/dapps/ModalEthers/.gitignore b/dapps/ModalEthers/.gitignore index 0cab2ac6..3dd4e2df 100644 --- a/dapps/ModalEthers/.gitignore +++ b/dapps/ModalEthers/.gitignore @@ -64,3 +64,6 @@ yarn-error.log # testing /coverage + +# env files +.env \ No newline at end of file diff --git a/dapps/ModalEthers/babel.config.js b/dapps/ModalEthers/babel.config.js index f842b77f..681d47b7 100644 --- a/dapps/ModalEthers/babel.config.js +++ b/dapps/ModalEthers/babel.config.js @@ -1,3 +1,4 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], + plugins: [['module:react-native-dotenv']], }; diff --git a/dapps/ModalEthers/package.json b/dapps/ModalEthers/package.json index 353baa7f..34abc6aa 100644 --- a/dapps/ModalEthers/package.json +++ b/dapps/ModalEthers/package.json @@ -4,10 +4,14 @@ "private": true, "scripts": { "android": "react-native run-android --appId com.walletconnect.modal.rnetherssample", + "android:build": "cd android && ./gradlew assembleRelease", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", - "test": "jest" + "test": "jest", + "e2e": "maestro test ../../.maestro", + "e2e:studio": "maestro studio", + "e2e:upload": "maestro cloud ./android/app/build/outputs/apk/release/app-release.apk .maestro" }, "dependencies": { "@react-native-async-storage/async-storage": "1.19.3", @@ -36,6 +40,7 @@ "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.8", "prettier": "^2.4.1", + "react-native-dotenv": "^3.4.9", "react-test-renderer": "18.2.0", "typescript": "4.8.4" }, diff --git a/dapps/ModalEthers/src/App.tsx b/dapps/ModalEthers/src/App.tsx index 32f44c6a..2bd31778 100644 --- a/dapps/ModalEthers/src/App.tsx +++ b/dapps/ModalEthers/src/App.tsx @@ -192,7 +192,7 @@ function App(): JSX.Element { + + + + \ No newline at end of file diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/dapps/ModalUProvider/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/dapps/ModalUProvider/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index a2f59082..5e197c7a 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..461b2b5a Binary files /dev/null and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 1b523998..94cdfe1b 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index ff10afd6..5b6f2ef3 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..edcde80f Binary files /dev/null and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 115a4c76..1aa33614 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index dcd3cd80..6e48b143 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..c6d132d4 Binary files /dev/null and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index 459ca609..732a276c 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 8ca12fe0..5c8a2506 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..dffd5077 Binary files /dev/null and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index 8e19b410..1a0b2fb1 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index b824ebdd..699c0643 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..b886c5b5 Binary files /dev/null and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index 4c19a13c..27f09164 100644 Binary files a/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/dapps/ModalUProvider/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/dapps/ModalUProvider/android/app/src/main/res/values/ic_launcher_background.xml b/dapps/ModalUProvider/android/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..53b8661c --- /dev/null +++ b/dapps/ModalUProvider/android/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #3396FF + \ No newline at end of file diff --git a/dapps/ModalUProvider/android/app/src/main/res/values/strings.xml b/dapps/ModalUProvider/android/app/src/main/res/values/strings.xml index 2b51eba5..9ba2ac33 100644 --- a/dapps/ModalUProvider/android/app/src/main/res/values/strings.xml +++ b/dapps/ModalUProvider/android/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - ModalUProvider + WCModal diff --git a/dapps/ModalUProvider/babel.config.js b/dapps/ModalUProvider/babel.config.js index f842b77f..681d47b7 100644 --- a/dapps/ModalUProvider/babel.config.js +++ b/dapps/ModalUProvider/babel.config.js @@ -1,3 +1,4 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], + plugins: [['module:react-native-dotenv']], }; diff --git a/dapps/ModalUProvider/ios/ModalUProvider.xcodeproj/project.pbxproj b/dapps/ModalUProvider/ios/ModalUProvider.xcodeproj/project.pbxproj index 54b5786c..264194a8 100644 --- a/dapps/ModalUProvider/ios/ModalUProvider.xcodeproj/project.pbxproj +++ b/dapps/ModalUProvider/ios/ModalUProvider.xcodeproj/project.pbxproj @@ -184,6 +184,7 @@ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + 0B274A70CEF94BE49CA86F96 /* Upload Debug Symbols to Sentry */, ); buildRules = ( ); @@ -264,7 +265,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; + shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nset -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"../node_modules/@sentry/cli/bin/sentry-cli react-native xcode $REACT_NATIVE_XCODE\\\"\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT ../node_modules/@sentry/react-native/scripts/collect-modules.sh\"\n"; }; 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; @@ -283,6 +284,20 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ModalUProvider/Pods-ModalUProvider-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + 0B274A70CEF94BE49CA86F96 /* Upload Debug Symbols to Sentry */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Upload Debug Symbols to Sentry"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nif [ -f \"$WITH_ENVIRONMENT\" ]; then\n . \"$WITH_ENVIRONMENT\"\nfi \nexport SENTRY_PROPERTIES=sentry.properties\n[ \"$SENTRY_INCLUDE_NATIVE_SOURCES\" = \"true\" ] && INCLUDE_SOURCES_FLAG=\"--include-sources\" || INCLUDE_SOURCES_FLAG=\"\"\n../node_modules/@sentry/cli/bin/sentry-cli debug-files upload \"$INCLUDE_SOURCES_FLAG\" \"$DWARF_DSYM_FOLDER_PATH\"\n"; + }; A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/Contents.json b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/Contents.json index 81213230..00db4241 100644 --- a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,46 +1,55 @@ { "images" : [ { + "filename" : "iOS App Icon_20pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { + "filename" : "iOS App Icon_20pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { + "filename" : "iOS App Icon_29pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { + "filename" : "iOS App Icon_29pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { + "filename" : "iOS App Icon_40pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { + "filename" : "iOS App Icon_40pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { + "filename" : "iOS App Icon_60pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { + "filename" : "iOS App Icon_60pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { + "filename" : "iOS App Icon_1024pt@1x.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_1024pt@1x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_1024pt@1x.png new file mode 100644 index 00000000..0ecf94d2 Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_1024pt@1x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_20pt@2x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_20pt@2x.png new file mode 100644 index 00000000..55b0c6f1 Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_20pt@2x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_20pt@3x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_20pt@3x.png new file mode 100644 index 00000000..f47a2002 Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_20pt@3x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_29pt@2x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_29pt@2x.png new file mode 100644 index 00000000..54810c59 Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_29pt@2x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_29pt@3x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_29pt@3x.png new file mode 100644 index 00000000..b939a5eb Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_29pt@3x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_40pt@2x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_40pt@2x.png new file mode 100644 index 00000000..a9d1dd8b Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_40pt@2x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_40pt@3x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_40pt@3x.png new file mode 100644 index 00000000..4792ff09 Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_40pt@3x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_60pt@2x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_60pt@2x.png new file mode 100644 index 00000000..4792ff09 Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_60pt@2x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_60pt@3x.png b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_60pt@3x.png new file mode 100644 index 00000000..0312bea6 Binary files /dev/null and b/dapps/ModalUProvider/ios/ModalUProvider/Images.xcassets/AppIcon.appiconset/iOS App Icon_60pt@3x.png differ diff --git a/dapps/ModalUProvider/ios/ModalUProvider/Info.plist b/dapps/ModalUProvider/ios/ModalUProvider/Info.plist index 03ad3cb0..6f65f56c 100644 --- a/dapps/ModalUProvider/ios/ModalUProvider/Info.plist +++ b/dapps/ModalUProvider/ios/ModalUProvider/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion en CFBundleDisplayName - ModalUProvider + WCModal CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/dapps/ModalUProvider/ios/Podfile.lock b/dapps/ModalUProvider/ios/Podfile.lock index 3a6312c3..9d7ceada 100644 --- a/dapps/ModalUProvider/ios/Podfile.lock +++ b/dapps/ModalUProvider/ios/Podfile.lock @@ -493,8 +493,14 @@ PODS: - React-Core - RNCClipboard (1.11.2): - React-Core + - RNSentry (5.9.2): + - React-Core + - Sentry/HybridSDK (= 8.11.0) - RNSVG (13.13.0): - React-Core + - Sentry/HybridSDK (8.11.0): + - SentryPrivate (= 8.11.0) + - SentryPrivate (8.11.0) - SocketRocket (0.6.1) - Yoga (1.14.0) - YogaKit (1.18.1): @@ -567,6 +573,7 @@ DEPENDENCIES: - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" - "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)" + - "RNSentry (from `../node_modules/@sentry/react-native`)" - RNSVG (from `../node_modules/react-native-svg`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) @@ -584,6 +591,8 @@ SPEC REPOS: - fmt - libevent - OpenSSL-Universal + - Sentry + - SentryPrivate - SocketRocket - YogaKit @@ -673,6 +682,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-async-storage/async-storage" RNCClipboard: :path: "../node_modules/@react-native-clipboard/clipboard" + RNSentry: + :path: "../node_modules/@sentry/react-native" RNSVG: :path: "../node_modules/react-native-svg" Yoga: @@ -733,7 +744,10 @@ SPEC CHECKSUMS: ReactCommon: 4b2bdcb50a3543e1c2b2849ad44533686610826d RNCAsyncStorage: c913ede1fa163a71cea118ed4670bbaaa4b511bb RNCClipboard: 3f0451a8100393908bea5c5c5b16f96d45f30bfc + RNSentry: da8111ddd855157a9e21294153156b85ae5d6be4 RNSVG: ed492aaf3af9ca01bc945f7a149d76d62e73ec82 + Sentry: 39d57e691e311bdb73bc1ab5bbebbd6bc890050d + SentryPrivate: 48712023cdfd523735c2edb6b06bedf26c4730a3 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 3efc43e0d48686ce2e8c60f99d4e6bd349aff981 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/dapps/ModalUProvider/package.json b/dapps/ModalUProvider/package.json index 4e5a3363..8fc3f2d2 100644 --- a/dapps/ModalUProvider/package.json +++ b/dapps/ModalUProvider/package.json @@ -4,15 +4,20 @@ "private": true, "scripts": { "android": "react-native run-android --appId com.walletconnect.modal.rnuprovidersample", + "android:build": "cd android && ./gradlew assembleRelease", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", - "test": "jest" + "test": "jest", + "e2e": "maestro test ../../.maestro", + "e2e:studio": "maestro studio", + "e2e:upload": "maestro cloud ./android/app/build/outputs/apk/release/app-release.apk .maestro" }, "dependencies": { "@react-native-async-storage/async-storage": "1.19.3", "@react-native-clipboard/clipboard": "1.11.2", "@react-native-community/netinfo": "9.4.1", + "@sentry/react-native": "5.9.2", "@walletconnect/encoding": "1.0.2", "@walletconnect/modal-react-native": "1.0.0-rc.11", "react": "18.2.0", @@ -35,6 +40,7 @@ "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.8", "prettier": "^2.4.1", + "react-native-dotenv": "^3.4.9", "react-test-renderer": "18.2.0", "typescript": "4.8.4" }, diff --git a/dapps/ModalUProvider/src/App.tsx b/dapps/ModalUProvider/src/App.tsx index e95f7b0d..f4fcf953 100644 --- a/dapps/ModalUProvider/src/App.tsx +++ b/dapps/ModalUProvider/src/App.tsx @@ -6,6 +6,7 @@ import { TouchableOpacity, View, } from 'react-native'; +import * as Sentry from '@sentry/react-native'; import { useWalletConnectModal, @@ -18,6 +19,10 @@ import {numberToHex, sanitizeHex, utf8ToHex} from '@walletconnect/encoding'; import ConfigUtils from './utils/ConfigUtils'; import {RequestModal} from './components/RequestModal'; +Sentry.init({ + dsn: ConfigUtils.ENV_SENTRY_DSN, +}); + function App(): JSX.Element { const {isConnected, provider, open} = useWalletConnectModal(); const [modalVisible, setModalVisible] = useState(false); @@ -147,7 +152,7 @@ function App(): JSX.Element { { @@ -27,4 +33,4 @@ const App = () => { ); }; -export default App; +export default Sentry.wrap(App); diff --git a/wallets/rn_cli_wallet/src/utils/Web3WalletClient.ts b/wallets/rn_cli_wallet/src/utils/Web3WalletClient.ts index 242e1c98..317f77ac 100644 --- a/wallets/rn_cli_wallet/src/utils/Web3WalletClient.ts +++ b/wallets/rn_cli_wallet/src/utils/Web3WalletClient.ts @@ -5,7 +5,6 @@ export let web3wallet: IWeb3Wallet; export let core: ICore; export let currentETHAddress: string; -// @ts-expect-error - env is a virtualised module via Babel config. import {ENV_PROJECT_ID, ENV_RELAY_URL} from '@env'; import {createOrRestoreEIP155Wallet} from './EIP155Wallet'; diff --git a/wallets/rn_cli_wallet/yarn.lock b/wallets/rn_cli_wallet/yarn.lock index aa91bc2b..135d2f9f 100644 --- a/wallets/rn_cli_wallet/yarn.lock +++ b/wallets/rn_cli_wallet/yarn.lock @@ -2464,6 +2464,115 @@ dependencies: nanoid "^3.1.23" +"@sentry-internal/tracing@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.69.0.tgz#8d8eb740b72967b6ba3fdc0a5173aa55331b7d35" + integrity sha512-4BgeWZUj9MO6IgfO93C9ocP3+AdngqujF/+zB2rFdUe+y9S6koDyUC7jr9Knds/0Ta72N/0D6PwhgSCpHK8s0Q== + dependencies: + "@sentry/core" "7.69.0" + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + tslib "^2.4.1 || ^1.9.3" + +"@sentry/browser@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.69.0.tgz#65427c90fb71c1775e2c1e38431efb7f4aec1e34" + integrity sha512-5ls+zu2PrMhHCIIhclKQsWX5u6WH0Ez5/GgrCMZTtZ1d70ukGSRUvpZG9qGf5Cw1ezS1LY+1HCc3whf8x8lyPw== + dependencies: + "@sentry-internal/tracing" "7.69.0" + "@sentry/core" "7.69.0" + "@sentry/replay" "7.69.0" + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + tslib "^2.4.1 || ^1.9.3" + +"@sentry/cli@2.20.7": + version "2.20.7" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.20.7.tgz#8f7f3f632c330cac6bd2278d820948163f3128a6" + integrity sha512-YaHKEUdsFt59nD8yLvuEGCOZ3/ArirL8GZ/66RkZ8wcD2wbpzOFbzo08Kz4te/Eo3OD5/RdW+1dPaOBgGbrXlA== + dependencies: + 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" + +"@sentry/core@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.69.0.tgz#ebbe01df573f438f8613107020a4e18eb9adca4d" + integrity sha512-V6jvK2lS8bhqZDMFUtvwe2XvNstFQf5A+2LMKCNBOV/NN6eSAAd6THwEpginabjet9dHsNRmMk7WNKvrUfQhZw== + dependencies: + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + tslib "^2.4.1 || ^1.9.3" + +"@sentry/hub@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.69.0.tgz#3ef3b98e1810b05cb4fb37a861bd700ef592a2a9" + integrity sha512-71TQ7P5de9+cdW1ETGI9wgi2VNqfyWaM3cnUvheXaSjPRBrr6mhwoaSjo+GGsiwx97Ob9DESZEIhdzcLupzkFA== + dependencies: + "@sentry/core" "7.69.0" + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + tslib "^2.4.1 || ^1.9.3" + +"@sentry/integrations@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.69.0.tgz#04c0206d9436ec7b79971e3bde5d6e1e9194595f" + integrity sha512-FEFtFqXuCo9+L7bENZxFpEAlIODwHl6FyW/DwLfniy9jOXHU7BhP/oICLrFE5J7rh1gNY7N/8VlaiQr3hCnS/g== + dependencies: + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + localforage "^1.8.1" + tslib "^2.4.1 || ^1.9.3" + +"@sentry/react-native@^5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-5.10.0.tgz#b61861276fcb35e69dbe9c4e098ed7c88598f5d9" + integrity sha512-YuEZJ3tW5qZlFGFm2FoAZ9vw1fWnjrhMh1IHxo+nUHP3FvVgGkAd/PmSSbgPr2T3YLOIJNiyDdG031Qi7YvtGA== + dependencies: + "@sentry/browser" "7.69.0" + "@sentry/cli" "2.20.7" + "@sentry/core" "7.69.0" + "@sentry/hub" "7.69.0" + "@sentry/integrations" "7.69.0" + "@sentry/react" "7.69.0" + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + +"@sentry/react@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.69.0.tgz#b9931ac590d8dad3390a9a03a516f1b1bd75615e" + integrity sha512-J+DciRRVuruf1nMmBOi2VeJkOLGeCb4vTOFmHzWTvRJNByZ0flyo8E/fyROL7+23kBq1YbcVY6IloUlH73hneQ== + dependencies: + "@sentry/browser" "7.69.0" + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + hoist-non-react-statics "^3.3.2" + tslib "^2.4.1 || ^1.9.3" + +"@sentry/replay@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.69.0.tgz#d727f96292d2b7c25df022fa53764fd39910fcda" + integrity sha512-oUqWyBPFUgShdVvgJtV65EQH9pVDmoYVQMOu59JI6FHVeL3ald7R5Mvz6GaNLXsirvvhp0yAkcAd2hc5Xi6hDw== + dependencies: + "@sentry/core" "7.69.0" + "@sentry/types" "7.69.0" + "@sentry/utils" "7.69.0" + +"@sentry/types@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.69.0.tgz#012b8d90d270a473cc2a5cf58a56870542739292" + integrity sha512-zPyCox0mzitzU6SIa1KIbNoJAInYDdUpdiA+PoUmMn2hFMH1llGU/cS7f4w/mAsssTlbtlBi72RMnWUCy578bw== + +"@sentry/utils@7.69.0": + version "7.69.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.69.0.tgz#b7594e4eb2a88b9b25298770b841dd3f81bd2aa4" + integrity sha512-4eBixe5Y+0EGVU95R4NxH3jkkjtkE4/CmSZD4In8SCkWGSauogePtq6hyiLsZuP1QHdpPb9Kt0+zYiBb2LouBA== + dependencies: + "@sentry/types" "7.69.0" + tslib "^2.4.1 || ^1.9.3" + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -3176,6 +3285,13 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + ajv@^6.10.0, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -3885,7 +4001,7 @@ debug@2.6.9, debug@^2.2.0: dependencies: ms "2.0.0" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -4900,6 +5016,13 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hoist-non-react-statics@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -4916,6 +5039,14 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -4938,6 +5069,11 @@ image-size@^1.0.2: dependencies: queue "6.0.2" +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -5835,11 +5971,25 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== + dependencies: + immediate "~3.0.5" + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +localforage@^1.8.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== + dependencies: + lie "3.1.1" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -6639,6 +6789,13 @@ node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1: dependencies: whatwg-url "^5.0.0" +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -7077,6 +7234,11 @@ process-warning@^1.0.0: resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== +progress@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + promise@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" @@ -7101,6 +7263,11 @@ prop-types@*, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + punycode@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" @@ -7161,7 +7328,7 @@ react-freeze@^1.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-is@^16.13.0, react-is@^16.13.1: +react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -8013,6 +8180,11 @@ tslib@^2.0.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +"tslib@^2.4.1 || ^1.9.3": + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -8248,7 +8420,7 @@ which-typed-array@^1.1.9: has-tostringtag "^1.0.0" is-typed-array "^1.1.10" -which@^2.0.1: +which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==