Skip to content
Merged
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Remove `@metamask/eth-block-tracker` peer dependency ([#85](https://github.com/MetaMask/nonce-tracker/pull/85))

## [6.0.1]
### Fixed
Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@metamask/eslint-config-mocha": "^10.0.0",
"@metamask/eslint-config-nodejs": "^10.0.0",
"@metamask/eslint-config-typescript": "^10.0.0",
"@metamask/eth-block-tracker": "^9.0.3",
"@types/node": "^16.18.59",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
Expand All @@ -53,9 +52,6 @@
"typescript": "^4.0.7",
"xtend": "^4.0.1"
},
"peerDependencies": {
"@metamask/eth-block-tracker": ">=9"
},
"engines": {
"node": "^16.20 || ^18.16 || >=20"
},
Expand Down
9 changes: 8 additions & 1 deletion src/NonceTracker.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import assert from 'assert';
import { Mutex } from 'async-mutex';
import type { BlockTracker } from '@metamask/eth-block-tracker';

import { Web3Provider } from '@ethersproject/providers';

/**
* A minimal "block tracker" type, with just the method used here. This is based upon the
* `BlockTracker` type from `@metamask/eth-block-tracker` v9.
*/
type BlockTracker = {
getLatestBlock: () => Promise<string>;
};

/**
* @property opts.provider - An ethereum provider
* @property opts.blockTracker - An instance of @metamask/eth-block-tracker
Expand Down
Loading
Loading