Skip to main content
Follow these guidelines to ensure your pull request is reviewed and merged smoothly.

Before You Start

1

Check existing issues

Look for existing issues or discussions related to your proposed change. If none exist, consider opening an issue first to discuss major changes.
2

Fork and clone

Fork the Rainbow repository and clone your fork locally:
git clone https://github.com/YOUR_USERNAME/rainbow.git
cd rainbow
3

Create a branch

Create a new branch for your changes:
git checkout -b feature/your-feature-name
Use descriptive branch names:
  • feature/add-wallet-connect-v2
  • fix/transaction-parsing-bug
  • refactor/improve-state-management
4

Set up development environment

Follow the setup instructions to configure your development environment.

Making Changes

Code Quality Standards

Ensure your code meets Rainbow’s quality standards:
1

Follow code conventions

Review and follow the code conventions:
  • Write TypeScript (no JavaScript)
  • No barrel exports
  • Use type-only imports
  • Follow ESLint rules
2

Add tests

Include tests for your changes. See testing guidelines.
3

Update documentation

Update relevant documentation if you’re changing APIs, adding features, or modifying behavior.

Commit Your Changes

Write clear, descriptive commit messages: Good commit messages:
git commit -m "Add support for WalletConnect v2"
git commit -m "Fix transaction list infinite scroll bug"
git commit -m "Refactor token price store to use createQueryStore"
Bad commit messages:
git commit -m "update"
git commit -m "fix bug"
git commit -m "changes"
Rainbow uses Husky pre-commit hooks that automatically:
  • Format code with Prettier
  • Lint code with ESLint
If the pre-commit hook fails, fix the issues and commit again.

Verification Checklist

Before submitting your PR, verify everything passes:
1

Run linting

yarn lint
This runs:
  • Format check with Prettier
  • TypeScript type checking
  • ESLint
2

Run type checks

yarn lint:ts
Ensure no TypeScript errors.
3

Check JavaScript types

yarn lint:js-types
Ensure JS files don’t regress the error baseline.
4

Run tests

yarn test
All tests must pass.
5

Check for circular dependencies

yarn check:cycles
Ensure no circular dependencies were introduced.
6

Test on device

Build and test on actual devices (iOS and Android if applicable):
yarn ios
yarn android

Creating the Pull Request

Push Your Branch

git push origin feature/your-feature-name

Open the PR

1

Navigate to GitHub

Go to the Rainbow repository on GitHub and click “New Pull Request”.
2

Select your branch

Select your fork and branch as the source.
3

Fill out the template

Rainbow uses a PR template. Fill it out completely:
Fixes APP-####

## What changed (plus any additional context for devs)

[Describe your changes in detail]

## Screen recordings / screenshots

[Add visual proof of your changes]

## What to test

[Provide step-by-step testing instructions]
4

Write a clear title

Use a descriptive title that summarizes the change:
  • “Add WalletConnect v2 support”
  • “Fix transaction parsing for ERC-1155 transfers”
  • “Improve performance of token list rendering”

PR Description Best Practices

What Changed

Provide context for reviewers: Good:
## What changed

- Migrated transaction store from React Query to createQueryStore
- Added reactive refetching when wallet address changes
- Improved error handling with retry logic
- Updated tests to cover new store behavior

This fixes an issue where transactions weren't updating when
switching wallets.
Bad:
## What changed

Updated the transaction store.

Screen Recordings / Screenshots

For UI changes, always include:
  • Screenshots or screen recordings
  • Before/after comparisons
  • Both iOS and Android if applicable
Example:
## Screen recordings / screenshots

### Before
![before](url-to-image)

### After
![after](url-to-image)

### iOS
[screen-recording.mov]

### Android
[screen-recording.mp4]

What to Test

Provide step-by-step testing instructions: Good:
## What to test

1. Open the app and navigate to the transaction list
2. Switch between wallets
3. Verify transactions update immediately
4. Send a test transaction
5. Verify it appears in the list without refreshing
6. Test on both iOS and Android
Bad:
## What to test

Test the transaction list.

Review Process

What to Expect

1

Automated checks

CI/CD will run automated checks:
  • Linting
  • Type checking
  • Tests
  • Build verification
All checks must pass before review.
2

Code review

Team members will review your code:
  • Check for code quality
  • Verify tests
  • Test functionality
  • Suggest improvements
3

Address feedback

Respond to review comments and make requested changes:
# Make changes
git add .
git commit -m "Address review feedback"
git push origin feature/your-feature-name
4

Approval and merge

Once approved, a maintainer will merge your PR.

Responding to Review Feedback

  • Be open to feedback and suggestions
  • Ask questions if feedback is unclear
  • Make requested changes promptly
  • Mark conversations as resolved when addressed
  • Thank reviewers for their time

Common PR Issues

CI/CD Failures

Linting Failures

# Fix formatting
yarn format

# Fix ESLint errors
yarn lint:js --fix

# Commit fixes
git add .
git commit -m "Fix linting issues"
git push

Test Failures

# Run tests locally
yarn test

# Fix failing tests
# Commit fixes
git add .
git commit -m "Fix test failures"
git push

Type Errors

# Check TypeScript errors
yarn lint:ts

# Fix type errors
# Commit fixes
git add .
git commit -m "Fix type errors"
git push

Merge Conflicts

If your PR has merge conflicts:
1

Update your local main

git checkout main
git pull upstream main
2

Rebase your branch

git checkout feature/your-feature-name
git rebase main
3

Resolve conflicts

Manually resolve conflicts in your editor.
4

Continue rebase

git add .
git rebase --continue
5

Force push

git push origin feature/your-feature-name --force

Large PRs

If your PR is too large:
  • Consider breaking it into smaller PRs
  • Each PR should focus on one feature or fix
  • Smaller PRs are easier to review and merge

After Your PR is Merged

1

Delete your branch

git checkout main
git branch -D feature/your-feature-name
git push origin --delete feature/your-feature-name
2

Update your fork

git pull upstream main
git push origin main
3

Celebrate

Congratulations! You’ve contributed to Rainbow Wallet! 🎉

PR Checklist

Use this checklist before submitting:
  • Code follows code conventions
  • All tests pass (yarn test)
  • Linting passes (yarn lint)
  • Type checking passes (yarn lint:ts)
  • No circular dependencies (yarn check:cycles)
  • Tests added for new functionality
  • Documentation updated if needed
  • PR description is complete and clear
  • Screenshots/recordings included for UI changes
  • Testing instructions provided
  • Tested on actual devices (iOS and Android)
  • No merge conflicts
  • Branch is up to date with main

Getting Help

If you need help with your PR:

Additional Resources

Code Conventions

Review coding standards

Testing Guidelines

Learn about testing requirements

Contributing Overview

Setup and getting started

Working with GraphQL

GraphQL development guide

Build docs developers (and LLMs) love