Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@jsr:registry=https://npm.jsr.io
ignore-scripts=true
legacy-peer-deps=true
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ node_js:
before_install:
- node scripts/hack-travis.mjs
install:
- yarn install --frozen-lockfile --network-concurrency 1
- yarn prepare
- npm ci
- npm run prepare
script:
- yarn lint
- yarn tsc
- yarn test
- npm run lint
- npx tsc
- npm test
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

22 changes: 11 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

## Package Manager

- **Use Yarn v1** instead of npm for all package management and script execution
- `yarn install` - Install dependencies
- `yarn add <package>` - Add new dependency
- `yarn add -D <package>` - Add dev dependency
- **Use npm** for all package management and script execution
- `npm ci` - Install dependencies from the lockfile (CI-style, reproducible)
- `npm install <package>` - Add new dependency
- `npm install -D <package>` - Add dev dependency

## Build/Test/Lint Commands

- `yarn lint` - Run ESLint on entire codebase
- `yarn fix` - Auto-fix linting issues and deduplicate yarn
- `yarn test` - Run Jest tests (single run)
- `yarn watch` - Run Jest tests in watch mode
- `yarn test --testNamePattern="test name"` - Run specific test by name
- `yarn verify` - Run lint, typechain, tsc, and test (full verification)
- `yarn precommit` - Full pre-commit check (localize, lint-staged, tsc, test)
- `npm run lint` - Run ESLint on entire codebase
- `npm run fix` - Auto-fix linting issues and dedupe the dependency tree
- `npm test` - Run Jest tests (single run)
- `npm run watch` - Run Jest tests in watch mode
- `npm test -- --testNamePattern="test name"` - Run specific test by name
- `npm run verify` - Run lint, typechain, tsc, and test (full verification)
- `npm run precommit` - Full pre-commit check (localize, lint-staged, tsc, test)
- `tsc` - TypeScript type checking (via package.json script)

## Code Style Guidelines
Expand Down
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def preBuildStages(String stageName, versionFile) {
writeJSON file: './release-version.json', json: versionFile
currentBuild.description = versionString

sh 'yarn'
sh 'npm ci'

// Import the settings files
withCredentials([file(credentialsId: 'githubSshKey', variable: 'id_github')]) {
Expand All @@ -24,13 +24,13 @@ def preBuildStages(String stageName, versionFile) {
// Pick the new build number and version from git:
sh 'node -r sucrase/register ./scripts/updateVersion.ts'

sh 'yarn prepare'
sh 'npm run prepare'
}
}

def preTest(String stageName) {
stage("${stageName}: preTest") {
sh 'yarn test --ci'
sh 'npm test -- --ci'
}
}

Expand Down Expand Up @@ -108,8 +108,8 @@ pipeline {
sh "cp ${id_github} ./id_github"
}

// Use npm to install Sucrase globally
sh 'yarn add --dev sucrase'
// Install Sucrase so gitVersionFile.ts can run before the full npm ci below
sh 'npm install --save-dev sucrase'
sh "node -r sucrase/register ./scripts/gitVersionFile.ts ${BRANCH_NAME}"

def versionFile = readJSON file: './release-version.json'
Expand Down
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,17 @@ The React Native documentation contains [detailed instructions on how to prepare

If you are using a Mac, follow both the iOS and Android target instructions. Otherwise, you only need the Android target instructions.

### Install Yarn

This project uses Yarn to manage Javascript dependencies:

https://yarnpkg.com

Do not use NPM to install dependencies, since that will not work.

### Checkout develop branch & install node_modules

This project uses npm to manage Javascript dependencies (npm ships with Node).

cd edge-react-gui
yarn
yarn prepare
npm ci
npm run prepare

### Run the bundler

yarn start
npm start

This bundler process needs to run in the background, so feel free to run this in its own terminal window.

Expand All @@ -57,15 +51,15 @@ Change the `AIRBITZ_API_KEY` in `env.json` to the API key you received from Edge

#### iOS

- Run `yarn prepare.ios` to generate the CocoaPods files. You will need to do this after the first install, and any time Xcode produces a `The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.` error.
- Run `npm run prepare.ios` to generate the CocoaPods files. You will need to do this after the first install, and any time Xcode produces a `The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.` error.
- Open `edge-react-gui/ios/edge.xcworkspace` in Xcode
- Choose a target device or simulator and tap the Play button on the top nav bar

#### Android

To build, install, and start the app on a simulator or physical phone with USB debugging, run:

yarn android
npm run android

Otherwise, to get an APK, do:

Expand Down Expand Up @@ -109,11 +103,11 @@ Set `BUILD_REPO_URL` to the URL of an empty Git repo that will hold a version
file that will be auto updated to increment the version and build number. Then
run the following to update a local `release-version.json` file

yarn gitVersionFile
npm run gitVersionFile

Update the project files based on the version in `release-version.json`

yarn updateVersion
npm run updateVersion

### Build, sign, and deploy

Expand All @@ -137,15 +131,15 @@ The included `deploy.ts` is a script to automate building, signing, and deployin
Run deploy

```sh
yarn deploy edge ios master
yarn deploy edge android master
npm run deploy edge ios master
npm run deploy edge android master
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README deploy commands missing -- argument separator

Medium Severity

The npm run deploy edge ios master commands don't forward arguments to the script. Unlike yarn, npm run requires a -- separator before script arguments. Without it, deploy.ts receives no values for argv[2]argv[4] (project name, platform, branch) and will fail or behave incorrectly. The Jenkinsfile correctly uses -- for npm test -- --ci, but these README commands were converted from yarn deploy without adding the separator.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e1a1fff. Configure here.

```

## Fastlane support

This repo supports utilizing Fastlane to automate updates to iOS Provisioning
Profiles. To use Fastlane, set the following environment variables and run
`yarn deploy` as mentioned above
`npm run deploy` as mentioned above

BUILD_REPO_URL // Git repo used to store encrypted provisioning
// keys.
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<data android:scheme="ethereum" />
<data android:scheme="dash" />
<data android:scheme="litecoin" />
<data android:scheme="zcash" />
</intent-filter>
<intent-filter android:label="Wallet Connect">
<action android:name="android.intent.action.VIEW" />
Expand Down
2 changes: 1 addition & 1 deletion docs/MAESTRO.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ cd ~/edge/edge-react-gui


```bash
yarn maestro
npm run maestro
```

## Creating Maestro tests with Maestro Studio
Expand Down
2 changes: 2 additions & 0 deletions ios/edge/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<string>ethereum</string>
<string>bitcoincash</string>
<string>bitcoin</string>
<string>zcash</string>
Comment thread
j0ntz marked this conversation as resolved.
<string>reqaddr</string>
</array>
</dict>
Expand All @@ -71,6 +72,7 @@
<string>ethereum</string>
<string>bitcoincash</string>
<string>bitcoin</string>
<string>zcash</string>
<string>reqaddr</string>
</array>
<key>LSRequiresIPhoneOS</key>
Expand Down
14 changes: 3 additions & 11 deletions maestro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ start() {
STEPS=("Checking Apple CLI tools installation"
"Installing Homebrew"
"Installing Git"
"Installing nvm, node, npm and yarn"
"Installing nvm, node, and npm"
"Installing the Java Development Kit (JDK)"
"Installing android-platform-tools"
"Installing Maestro")

CMDS=("verify_apple_cli_tools_installed"
"install_homebrew"
"install_git"
"install_node_npm_yarn"
"install_node_npm"
"install_jdk"
"install_adb"
"install_maestro")
Expand Down Expand Up @@ -140,7 +140,7 @@ install_git() {
fi
}

install_node_npm_yarn() {
install_node_npm() {
if is_cmd nvm; then
echo "NVM already installed. "
else
Expand All @@ -159,14 +159,6 @@ install_node_npm_yarn() {
nvm install $NODE_VERSION
nvm use $NODE_VERSION
fi

if is_cmd yarn; then
echo "Yarn already installed..."
else
echo "Installing Yarn"
npm install -g yarn
fi

}

verify_apple_cli_tools_installed() {
Expand Down
Loading
Loading