SwapsController
MetaMask Swaps controller.
Installation
yarn add @metamask/swaps-controller
or
npm install @metamask/swaps-controller
Usage
import SwapsController, { swapsUtils } from '@metamask/swaps-controller';
API
TODO
Testing
Run yarn test
to run the tests once.
To run tests on file changes, run yarn test:watch
.
Release & Publishing
The project follows the same release process as the other libraries in the MetaMask organization:
- Create a release branch
- For a typical release, this would be based on
main
- To update an older maintained major version, base the release branch on the major version branch (e.g.
1.x
)
- Update the changelog
- Update version in package.json file (e.g.
yarn version --minor --no-git-tag-version
) - Create a pull request targeting the base branch (e.g. master or 1.x)
- Code review and QA
- Once approved, the PR is squashed & merged
- The commit on the base branch is tagged
- The tag can be published as needed