Skip to content

Commit

Permalink
deps: nonce-tracker@^2.0.0->^3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Nov 15, 2023
1 parent 6e92916 commit dcad094
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/transaction-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ethereumjs-util": "^7.0.10",
"fast-json-patch": "^3.1.1",
"lodash": "^4.17.21",
"nonce-tracker": "^2.0.0",
"nonce-tracker": "^3.0.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
import { NetworkClientType, NetworkStatus } from '@metamask/network-controller';
import { errorCodes, providerErrors, rpcErrors } from '@metamask/rpc-errors';
import HttpProvider from 'ethjs-provider-http';
import NonceTracker from 'nonce-tracker';
import { NonceTracker } from 'nonce-tracker';

import { FakeBlockTracker } from '../../../tests/fake-block-tracker';
import { mockNetwork } from '../../../tests/mock-network';
Expand Down
5 changes: 3 additions & 2 deletions packages/transaction-controller/src/TransactionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import MethodRegistry from 'eth-method-registry';
import { addHexPrefix, bufferToHex } from 'ethereumjs-util';
import { EventEmitter } from 'events';
import { merge, pickBy } from 'lodash';
import NonceTracker from 'nonce-tracker';
import type { NonceLock } from 'nonce-tracker/dist/NonceTracker';
import { NonceTracker } from 'nonce-tracker';
import type { NonceLock } from 'nonce-tracker';
import { v1 as random } from 'uuid';

import { EtherscanRemoteTransactionSource } from './helpers/EtherscanRemoteTransactionSource';
Expand Down Expand Up @@ -462,6 +462,7 @@ export class TransactionController extends BaseController<
hooks?.getAdditionalSignArguments ?? (() => []);

this.nonceTracker = new NonceTracker({
// @ts-expect-error provider types misaligned: SafeEventEmitterProvider vs Record<string,string>
provider,
blockTracker,
getPendingTransactions: (address) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { query } from '@metamask/controller-utils';
import type { BlockTracker } from '@metamask/network-controller';
import type NonceTracker from 'nonce-tracker';
import type { NonceTracker } from 'nonce-tracker';

import { TransactionStatus } from '../types';
import { PendingTransactionTracker } from './PendingTransactionTracker';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type EthQuery from '@metamask/eth-query';
import type { BlockTracker } from '@metamask/network-controller';
import { createModuleLogger } from '@metamask/utils';
import EventEmitter from 'events';
import type NonceTracker from 'nonce-tracker';
import type { NonceTracker } from 'nonce-tracker';

import { projectLogger } from '../logger';
import type { TransactionState } from '../TransactionController';
Expand Down
2 changes: 1 addition & 1 deletion packages/transaction-controller/src/utils/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Transaction as NonceTrackerTransaction } from 'nonce-tracker/dist/NonceTracker';
import type { Transaction as NonceTrackerTransaction } from 'nonce-tracker';

import type {
GasPriceValue,
Expand Down
2 changes: 1 addition & 1 deletion packages/transaction-controller/src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { convertHexToDecimal } from '@metamask/controller-utils';
import { getKnownPropertyNames } from '@metamask/utils';
import { addHexPrefix, isHexString } from 'ethereumjs-util';
import type { Transaction as NonceTrackerTransaction } from 'nonce-tracker/dist/NonceTracker';
import type { Transaction as NonceTrackerTransaction } from 'nonce-tracker';

import type {
GasPriceValue,
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@ __metadata:
fast-json-patch: ^3.1.1
jest: ^27.5.1
lodash: ^4.17.21
nonce-tracker: ^2.0.0
nonce-tracker: ^3.0.0
sinon: ^9.2.4
ts-jest: ^27.1.4
typedoc: ^0.24.8
Expand Down Expand Up @@ -8424,13 +8424,13 @@ __metadata:
languageName: node
linkType: hard

"nonce-tracker@npm:^2.0.0":
version: 2.0.0
resolution: "nonce-tracker@npm:2.0.0"
"nonce-tracker@npm:^3.0.0":
version: 3.0.0
resolution: "nonce-tracker@npm:3.0.0"
dependencies:
"@ethersproject/providers": ^5.7.2
async-mutex: ^0.3.1
checksum: 7fc901b7a5e5f3b1c6431864780ab47c69aed096f1bcc0903242e7c9189b78612fe04d076cf451ea63aa646858fb3bd834fc707223295ad8e04a3d847e5d703e
checksum: f679e83359c3d0b1941cb8569057445b5430b7e5645216442c256b2061ffb08ebee07e15011d3d55acf75710e054abd924c1b1bb38847956ef9f3bb7eed622d4
languageName: node
linkType: hard

Expand Down

0 comments on commit dcad094

Please sign in to comment.