Skip to content

Commit

Permalink
Merge branch 'main' into snyk-fix-a7cd6c79d2dc30527e08e5a4d1daa9c3
Browse files Browse the repository at this point in the history
  • Loading branch information
iGroza committed Nov 14, 2024
2 parents 9f7124f + ec975d3 commit 2195e19
Show file tree
Hide file tree
Showing 428 changed files with 16,593 additions and 10,096 deletions.
6 changes: 0 additions & 6 deletions .buckconfig

This file was deleted.

55 changes: 55 additions & 0 deletions .devpkg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const path = require('path');
const fs = require('fs');
const config = require('./.devpkg.json');

const extraNodeModules = {};
const watchFolders = [];
const nodeModulesPaths = [];

if (config.enabled) {
Object.entries(config.packages).forEach(([pkgName, pkgConfig]) => {
const pkgPath = pkgConfig.path;
const useDevEntryPoint = pkgConfig.useDevEntryPoint ?? false;
const packageJsonPath = path.resolve(pkgPath, 'package.json');
const packageJson = require(packageJsonPath);

let entryPoint = '';
if (useDevEntryPoint && packageJson.devEntryPoint) {
entryPoint = packageJson.devEntryPoint;
} else if (packageJson.main) {
entryPoint = packageJson.main;
}

if (entryPoint) {
const fullEntryPath = path.resolve(__dirname, pkgPath, entryPoint);
if (fs.existsSync(fullEntryPath)) {
extraNodeModules[pkgName] = fullEntryPath;
const resolvedPkgPath = path.resolve(__dirname, pkgPath);
watchFolders.push(resolvedPkgPath);
nodeModulesPaths.push(resolvedPkgPath);

console.log(
'\x1b[32m%s\x1b[0m',
`✅ [devpkg] ${pkgName} -> ${extraNodeModules[pkgName]}`,
);
console.log('\x1b[34m%s\x1b[0m', `📝 ${packageJson.description}`);
} else {
console.error(
'\x1b[31m%s\x1b[0m',
`❌ [devpkg] Entry point not found for ${pkgName}: ${fullEntryPath}`,
);
}
} else {
console.error(
'\x1b[31m%s\x1b[0m',
`❌ [devpkg] No entry point specified for ${pkgName}`,
);
}
});
}

module.exports = {
extraNodeModules,
watchFolders,
nodeModulesPaths,
};
13 changes: 13 additions & 0 deletions .devpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"enabled": false,
"packages": {
"@haqq/rn-wallet-providers": {
"path": "../haqq-rn-wallet-providers",
"useDevEntryPoint": true
},
"@haqq/shared-react-native": {
"path": "../haqq-wallet-shared-react-native",
"useDevEntryPoint": true
}
}
}
34 changes: 34 additions & 0 deletions .devpkg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# DevPkg Documentation

## Overview

The DevPkg feature allows developers to override npm packages with local development versions. This is particularly useful when working on multiple interconnected packages simultaneously, enabling real-time testing and debugging of changes across projects.

## How It Works

DevPkg modifies the Metro bundler configuration to prioritize specified local package directories over the versions installed in `node_modules`. This allows you to use development versions of packages without publishing them to npm or manually linking them.

## Configuration

### .devpkg.json

This file contains the configuration for DevPkg. Here's an example structure:

```json
{
"enabled": true,
"packages": {
"your-local-package": {
"path": "/path/to/your/local/package",
"useDevEntryPoint": true
}
}
}
```

### Explanation

- `enabled`: Enables or disables the package overriding.
- `packages`: A list of packages to override with local development versions.
- `path`: The path to the local package directory.
- `useDevEntryPoint`: If true, uses the `devEntryPoint` specified in the package.json of the local package. Otherwise, uses the `main` field.
47 changes: 37 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,20 +1,47 @@
PUSH_NOTIFICATIONS=
# Default chain provider configuration
PROVIDER_NETWORK=https://rpc.eth.testedge2.haqq.network
PROVIDER_WS_NETWORK=wss://rpc-ws.eth.testedge2.haqq.network
NETWORK_EXPLORER=https://explorer.testedge2.haqq.network/
PROVIDER_CHAIN_ID=54211

# Wallet Connect Configuration
WALLET_CONNECT_PROJECT_ID=
WALLET_CONNECT_RELAY_URL=
WALLET_CONNECT_RELAY_URL=wss://relay.walletconnect.org

SENTRY_DSN="https://<example>@<example>.ingest.sentry.io/<example>"
WEB3AUTH_CLIENT_ID=
# Google Sign In
GOOGLE_SIGNIN_WEB_CLIENT_ID=

WEB3AUTH_DISCORD_VERIFIER=
WEB3AUTH_DISCORD_CLIENT_ID=
# HAQQ Backend Configuration
HAQQ_BACKEND=
HAQQ_BACKEND_DEV=

# App ids Configuration
GOOGLE_PLAY_PACKAGE=com.haqq.wallet
APPSTORE_APP_ID=6443843352

# CAPTCHA Configuration
# turnstile https://dash.cloudflare.com/login
TURNSTILE_URL=
TURNSTILE_SITEKEY=
# reCAPTCHA https://www.google.com/recaptcha/admin/create
RECAPTCHA_V2_URL=
RECAPTCHA_V2_SITEKEY=
# hCaptcha https://dashboard.hcaptcha.com/login
HCAPTCHA_SITE_KEY=
HCAPTCHA_URL=

IS_DEVELOPMENT=1
# End-to-End Testing Configuration
FOR_DETOX=false
DETOX_MILK_PRIVATE_KEY=
DETOX_PROVIDER=https://rpc.eth.testedge2.haqq.network
DETOX_CHAIN_ID=54211

GOOGLE_SIGNIN_WEB_CLIENT_ID=
# Other Configuration
MMKV_KEY=YOUR_VERY_SECURE_KEY_FOR_MMKV_ENCRYPTION
STORIES_ENABLED=true
ENVIRONMENT=development
IS_DEVELOPMENT=1
APP_VERSION=1.0.0
POSTHOG_API_KEY=
POSTHOG_HOST=
SENTRY_DSN="https://<example>@<example>.ingest.sentry.io/<example>"
ADJUST_TOKEN=
ADJUST_ENVIRONMENT=sandbox
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: '@react-native-community',
extends: '@react-native',
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/distribute-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@ jobs:
echo ${{secrets.GOOGLE_SERVICE_ANDROID}} | base64 -d > android/app/google-services.json
echo "PROVIDER_NETWORK=${{secrets.PROVIDER_NETWORK}}" >> .env
echo "PROVIDER_WS_NETWORK=${{secrets.PROVIDER_WS_NETWORK}}" >> .env
echo "PROVIDER_CHAIN_ID=${{secrets.PROVIDER_CHAIN_ID}}" >> .env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> .env
echo "NETWORK_EXPLORER=${{secrets.NETWORK_EXPLORER}}" >> .env
echo "ENVIRONMENT=distribution" >> .env
echo "IS_DEVELOPMENT=${{github.event.inputs.IS_DEVELOPMENT}}" >> .env
echo "WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}}" >> .env
echo "WALLET_CONNECT_RELAY_URL=${{secrets.WALLET_CONNECT_RELAY_URL}}" >> .env
echo "WEB3AUTH_CLIENT_ID=${{secrets.WEB3AUTH_CLIENT_ID}}" >> .env
echo "HCAPTCHA_SITE_KEY=${{secrets.HCAPTCHA_SITE_KEY}}" >> .env
echo "GOOGLE_SIGNIN_WEB_CLIENT_ID=${{secrets.GOOGLE_SIGNIN_WEB_CLIENT_ID}}" >> .env
echo "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/distribute-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,12 @@ jobs:
echo ${{secrets.GOOGLE_SERVICE_IOS}} | base64 -d > ios/GoogleService-Info.plist
echo "PROVIDER_NETWORK=${{secrets.PROVIDER_NETWORK}}" >> .env
echo "PROVIDER_WS_NETWORK=${{secrets.PROVIDER_WS_NETWORK}}" >> .env
echo "PROVIDER_CHAIN_ID=${{secrets.PROVIDER_CHAIN_ID}}" >> .env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> .env
echo "NETWORK_EXPLORER=${{secrets.NETWORK_EXPLORER}}" >> .env
echo "ENVIRONMENT=distribution" >> .env
echo "IS_DEVELOPMENT=${{github.event.inputs.IS_DEVELOPMENT}}" >> .env
echo "WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}}" >> .env
echo "WALLET_CONNECT_RELAY_URL=${{secrets.WALLET_CONNECT_RELAY_URL}}" >> .env
echo "WEB3AUTH_CLIENT_ID=${{secrets.WEB3AUTH_CLIENT_ID}}" >> .env
echo "HCAPTCHA_SITE_KEY=${{secrets.HCAPTCHA_SITE_KEY}}" >> .env
echo "GOOGLE_SIGNIN_WEB_CLIENT_ID=${{secrets.GOOGLE_SIGNIN_WEB_CLIENT_ID}}" >> .env
echo "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@ jobs:
secrets: inherit
needs:
- slack_notify
if: ${{ github.ref == 'refs/heads/main' }}
3 changes: 0 additions & 3 deletions .github/workflows/e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,11 @@ jobs:
echo ${{secrets.GOOGLE_SERVICE_ANDROID}} | base64 -d > android/app/google-services.json
echo "PROVIDER_NETWORK=${{secrets.PROVIDER_NETWORK}}" >> .env
echo "PROVIDER_WS_NETWORK=${{secrets.PROVIDER_WS_NETWORK}}" >> .env
echo "PROVIDER_CHAIN_ID=${{secrets.PROVIDER_CHAIN_ID}}" >> .env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> .env
echo "NETWORK_EXPLORER=${{secrets.NETWORK_EXPLORER}}" >> .env
echo "ENVIRONMENT=test" >> .env
echo "WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}}" >> .env
echo "WALLET_CONNECT_RELAY_URL=${{secrets.WALLET_CONNECT_RELAY_URL}}" >> .env
echo "WEB3AUTH_CLIENT_ID=${{secrets.WEB3AUTH_CLIENT_ID}}" >> .env
echo "HCAPTCHA_SITE_KEY=${{secrets.HCAPTCHA_SITE_KEY}}" >> .env
echo "GOOGLE_SIGNIN_WEB_CLIENT_ID=${{secrets.GOOGLE_SIGNIN_WEB_CLIENT_ID}}" >> .env
echo "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,11 @@ jobs:
echo ${{secrets.GOOGLE_SERVICE_IOS}} | base64 -d > ios/GoogleService-Info.plist
echo "PROVIDER_NETWORK=${{secrets.PROVIDER_NETWORK}}" >> .env
echo "PROVIDER_WS_NETWORK=${{secrets.PROVIDER_WS_NETWORK}}" >> .env
echo "PROVIDER_CHAIN_ID=${{secrets.PROVIDER_CHAIN_ID}}" >> .env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> .env
echo "NETWORK_EXPLORER=${{secrets.NETWORK_EXPLORER}}" >> .env
echo "ENVIRONMENT=test" >> .env
echo "WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}}" >> .env
echo "WALLET_CONNECT_RELAY_URL=${{secrets.WALLET_CONNECT_RELAY_URL}}" >> .env
echo "WEB3AUTH_CLIENT_ID=${{secrets.WEB3AUTH_CLIENT_ID}}" >> .env
echo "HCAPTCHA_SITE_KEY=${{secrets.HCAPTCHA_SITE_KEY}}" >> .env
echo "GOOGLE_SIGNIN_WEB_CLIENT_ID=${{secrets.GOOGLE_SIGNIN_WEB_CLIENT_ID}}" >> .env
echo "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/generate-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,12 @@ jobs:
echo ${{secrets.GOOGLE_SERVICE_ANDROID}} | base64 -d > android/app/google-services.json
echo "PROVIDER_NETWORK=${{secrets.PROVIDER_NETWORK}}" >> .env
echo "PROVIDER_WS_NETWORK=${{secrets.PROVIDER_WS_NETWORK}}" >> .env
echo "PROVIDER_CHAIN_ID=${{secrets.PROVIDER_CHAIN_ID}}" >> .env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> .env
echo "NETWORK_EXPLORER=${{secrets.NETWORK_EXPLORER}}" >> .env
echo "ENVIRONMENT=distribution" >> .env
echo "IS_DEVELOPMENT=false" >> .env
echo "WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}}" >> .env
echo "WALLET_CONNECT_RELAY_URL=${{secrets.WALLET_CONNECT_RELAY_URL}}" >> .env
echo "WEB3AUTH_CLIENT_ID=${{secrets.WEB3AUTH_CLIENT_ID}}" >> .env
echo "HCAPTCHA_SITE_KEY=${{secrets.HCAPTCHA_SITE_KEY}}" >> .env
echo "GOOGLE_SIGNIN_WEB_CLIENT_ID=${{secrets.GOOGLE_SIGNIN_WEB_CLIENT_ID}}" >> .env
echo "HAQQ_BACKEND=${{secrets.HAQQ_BACKEND}}" >> .env
Expand Down
22 changes: 14 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local
**/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -30,26 +30,25 @@ build/
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
node_modules/
npm-debug.log
yarn-error.log
.pnp.*

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
!xcshareddata
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
Expand All @@ -66,7 +65,7 @@ buck-out/
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/
/tmp/*

Expand All @@ -90,3 +89,10 @@ ios/tmp.xcconfig

.direnv
.devenv

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage
.aider*
2 changes: 1 addition & 1 deletion .last-build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
053c47c44a04b18bfb66645ea7377543085c9bfc
98910ab395927e5bc70db3058cbca9a50682160c
22 changes: 22 additions & 0 deletions .yarn/patches/@sentry-react-native-npm-5.33.1-7dbdef21fa.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/sentry.gradle b/sentry.gradle
index 99f2bafdfdb17dc65c2cdf19d40b11e4fc3b1158..23c40f19e3f5f57ed2b7bde3e7cd66f124702f33 100644
--- a/sentry.gradle
+++ b/sentry.gradle
@@ -162,7 +162,7 @@ gradle.projectsEvaluated {

def resolvedCliPackage = null
try {
- resolvedCliPackage = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
+ resolvedCliPackage = new File("$reactRoot/node_modules/@sentry/react-native/package.json").getParentFile();
} catch (Throwable ignored) {}
def cliPackage = resolvedCliPackage != null && resolvedCliPackage.exists() ? resolvedCliPackage.getAbsolutePath() : "$reactRoot/node_modules/@sentry/cli"
def cliExecutable = sentryProps.get("cli.executable", "$cliPackage/bin/sentry-cli")
@@ -290,7 +290,7 @@ gradle.projectsEvaluated {
def resolveSentryReactNativeSDKPath(reactRoot) {
def resolvedSentryPath = null
try {
- resolvedSentryPath = new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
+ resolvedSentryPath = new File("$reactRoot/node_modules/@sentry/react-native/package.json").getParentFile();
} catch (Throwable ignored) {} // if the resolve fails we fallback to the default path
def sentryPackage = resolvedSentryPath != null && resolvedSentryPath.exists() ? resolvedSentryPath.getAbsolutePath() : "$reactRoot/node_modules/@sentry/react-native"
return sentryPackage
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '3.2.0'

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '~> 1.13'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
gem 'fastlane', '~> 2.221.1', '>= 2.221.1'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'fastlane', '~> 2.223.1', '>= 2.223.1'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
Loading

0 comments on commit 2195e19

Please sign in to comment.