Skip to content

Commit

Permalink
Merge pull request #101 from WalletConnect/sentry
Browse files Browse the repository at this point in the history
Added Sentry
  • Loading branch information
ignaciosantise authored Sep 27, 2023
2 parents ac65a4b + 5b04c8a commit 478396f
Show file tree
Hide file tree
Showing 73 changed files with 560 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: v2explorer-android
name: dapp-modal-android

on:
pull_request:
Expand All @@ -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:
Expand All @@ -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
4 changes: 2 additions & 2 deletions .maestro/dapp-flow.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# flow.yaml
appId: "com.walletconnect.modal.rnviemsample"
appId: "com.walletconnect.modal.rnuprovidersample"
---
- launchApp
- extendedWaitUntil:
visible: "Connect"
timeout: 60000
timeout: 60000
1 change: 1 addition & 0 deletions dapps/ModalEthers/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENV_PROJECT_ID='YOUR_PROJECT_ID' #Get it from https://cloud.walletconnect.com/
3 changes: 3 additions & 0 deletions dapps/ModalEthers/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ yarn-error.log

# testing
/coverage

# env files
.env
1 change: 1 addition & 0 deletions dapps/ModalEthers/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [['module:react-native-dotenv']],
};
7 changes: 6 additions & 1 deletion dapps/ModalEthers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion dapps/ModalEthers/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function App(): JSX.Element {
</TouchableOpacity>
</View>
<WalletConnectModal
projectId={ConfigUtils.PROJECT_ID}
projectId={ConfigUtils.ENV_PROJECT_ID}
providerMetadata={ConfigUtils.providerMetadata}
sessionParams={ConfigUtils.sessionParams}
onCopyClipboard={onCopy}
Expand Down
3 changes: 3 additions & 0 deletions dapps/ModalEthers/src/types/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module '@env' {
export const ENV_PROJECT_ID: string;
}
5 changes: 2 additions & 3 deletions dapps/ModalEthers/src/utils/ConfigUtils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {ENV_PROJECT_ID} from '@env';
import {IProviderMetadata} from '@walletconnect/modal-react-native';

const PROJECT_ID = '90369b5c91c6f7fffe308df2b30f3ace';

const providerMetadata: IProviderMetadata = {
name: 'Modal with Ethers',
description: 'RN example using Ethers 5 by WalletConnect',
Expand All @@ -24,7 +23,7 @@ const sessionParams = {
};

export default {
PROJECT_ID,
ENV_PROJECT_ID,
providerMetadata,
sessionParams,
};
5 changes: 4 additions & 1 deletion dapps/ModalEthers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "@tsconfig/react-native/tsconfig.json"
"extends": "@tsconfig/react-native/tsconfig.json",
"compilerOptions": {
"typeRoots": ["./src/types"],
}
}
12 changes: 12 additions & 0 deletions dapps/ModalEthers/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3700,6 +3700,11 @@ domutils@^3.0.1:
domelementtype "^2.3.0"
domhandler "^5.0.3"

dotenv@^16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

duplexify@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0"
Expand Down Expand Up @@ -6844,6 +6849,13 @@ [email protected]:
dependencies:
prop-types "^15.7.2"

react-native-dotenv@^3.4.9:
version "3.4.9"
resolved "https://registry.yarnpkg.com/react-native-dotenv/-/react-native-dotenv-3.4.9.tgz#621c5b0c1d0c5c7f569bfe5a1d804bec7885c010"
integrity sha512-dbyd+mcy7SUzxEgmt33TRf1FGcNe6swJhXmB0unKkI49F7+pidog9kPtjxMLTAfmKA8gcN2XHQSKltGfGbGCLQ==
dependencies:
dotenv "^16.3.1"

[email protected]:
version "1.9.0"
resolved "https://registry.yarnpkg.com/react-native-get-random-values/-/react-native-get-random-values-1.9.0.tgz#6cb30511c406922e75fe73833dc1812a85bfb37e"
Expand Down
3 changes: 3 additions & 0 deletions dapps/ModalUProvider/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ENV_PROJECT_ID='YOUR_ENV_PROJECT_ID' #Get it from https://cloud.walletconnect.com/
ENV_RELAY_URL=''
ENV_SENTRY_DSN='...'
6 changes: 6 additions & 0 deletions dapps/ModalUProvider/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ yarn-error.log

# testing
/coverage

# env files
.env

# Sentry
sentry.properties
1 change: 1 addition & 0 deletions dapps/ModalUProvider/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"

/**
* This is the configuration block to customize your React Native Android app.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#3396FF</color>
</resources>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">ModalUProvider</string>
<string name="app_name">WCModal</string>
</resources>
1 change: 1 addition & 0 deletions dapps/ModalUProvider/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [['module:react-native-dotenv']],
};
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,46 +1,55 @@
{
"images" : [
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "iOS App [email protected]",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dapps/ModalUProvider/ios/ModalUProvider/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>ModalUProvider</string>
<string>WCModal</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
14 changes: 14 additions & 0 deletions dapps/ModalUProvider/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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`)

Expand All @@ -584,6 +591,8 @@ SPEC REPOS:
- fmt
- libevent
- OpenSSL-Universal
- Sentry
- SentryPrivate
- SocketRocket
- YogaKit

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion dapps/ModalUProvider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
},
Expand Down
Loading

0 comments on commit 478396f

Please sign in to comment.