Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: nonce-tracker@^1.1.0->^3.0.0 #2040

Merged
merged 6 commits into from
Nov 17, 2023
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
7 changes: 0 additions & 7 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,6 @@ gen_enforced_field(WorkspaceCwd, 'publishConfig.registry', 'https://registry.npm
gen_enforced_field(WorkspaceCwd, 'publishConfig', null) :-
workspace_field(WorkspaceCwd, 'private', true).

% nonce-tracker has an unlisted dependency on babel-runtime (via `ethjs-query`), so that package
mcmire marked this conversation as resolved.
Show resolved Hide resolved
% needs to be present if nonce-tracker is present.
gen_enforced_dependency(WorkspaceCwd, 'babel-runtime', '^6.26.0', 'peerDependencies') :-
workspace_has_dependency(WorkspaceCwd, 'nonce-tracker', _, 'dependencies').
gen_enforced_dependency(WorkspaceCwd, 'babel-runtime', '^6.26.0', 'devDependencies') :-
workspace_has_dependency(WorkspaceCwd, 'nonce-tracker', _, 'dependencies').

% eth-method-registry has an unlisted dependency on babel-runtime (via `ethjs->ethjs-query`), so
% that package needs to be present if eth-method-registry is present.
gen_enforced_dependency(WorkspaceCwd, 'babel-runtime', '^6.26.0', 'peerDependencies') :-
Expand Down
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": "^1.1.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
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>
mcmire marked this conversation as resolved.
Show resolved Hide resolved
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
172 changes: 25 additions & 147 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ __metadata:
languageName: node
linkType: hard

"@ethersproject/providers@npm:^5.7.0":
"@ethersproject/providers@npm:^5.7.0, @ethersproject/providers@npm:^5.7.2":
version: 5.7.2
resolution: "@ethersproject/providers@npm:5.7.2"
dependencies:
Expand Down Expand Up @@ -2427,40 +2427,7 @@ __metadata:
languageName: unknown
linkType: soft

"@metamask/snaps-controllers@npm:^3.0.0, @metamask/snaps-controllers@npm:^3.1.0":
version: 3.1.1
resolution: "@metamask/snaps-controllers@npm:3.1.1"
dependencies:
"@metamask/approval-controller": ^4.0.0
"@metamask/base-controller": ^3.2.0
"@metamask/json-rpc-engine": ^7.1.1
"@metamask/object-multiplex": ^1.2.0
"@metamask/permission-controller": ^5.0.0
"@metamask/post-message-stream": ^7.0.0
"@metamask/rpc-errors": ^6.1.0
"@metamask/snaps-registry": ^2.1.0
"@metamask/snaps-rpc-methods": ^3.1.0
"@metamask/snaps-utils": ^3.1.0
"@metamask/utils": ^8.1.0
"@xstate/fsm": ^2.0.0
concat-stream: ^2.0.0
get-npm-tarball-url: ^2.0.3
gunzip-maybe: ^1.4.2
immer: ^9.0.6
json-rpc-middleware-stream: ^5.0.0
nanoid: ^3.1.31
readable-web-to-node-stream: ^3.0.2
tar-stream: ^3.1.6
peerDependencies:
"@metamask/snaps-execution-environments": ^3.1.0
peerDependenciesMeta:
"@metamask/snaps-execution-environments":
optional: true
checksum: a4fb339916481111c8c68c043e0633141583ae3128ccb78dc08b824791a1de394e293b5c2909b0d18af2858e8cc1963e4afc3f43abd75b62ed43845f2c0ece3f
languageName: node
linkType: hard

"@metamask/snaps-controllers@npm:^3.2.0":
"@metamask/snaps-controllers@npm:^3.0.0, @metamask/snaps-controllers@npm:^3.1.0, @metamask/snaps-controllers@npm:^3.2.0":
version: 3.2.0
resolution: "@metamask/snaps-controllers@npm:3.2.0"
dependencies:
Expand Down Expand Up @@ -2506,23 +2473,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/snaps-rpc-methods@npm:^3.1.0":
version: 3.1.0
resolution: "@metamask/snaps-rpc-methods@npm:3.1.0"
dependencies:
"@metamask/key-tree": ^9.0.0
"@metamask/permission-controller": ^5.0.0
"@metamask/rpc-errors": ^6.1.0
"@metamask/snaps-ui": ^3.0.1
"@metamask/snaps-utils": ^3.1.0
"@metamask/utils": ^8.1.0
"@noble/hashes": ^1.3.1
superstruct: ^1.0.3
checksum: 4ba535c970db72dad65d9d303c3def57c4130b620fb1276f855e73a59535e587535cfa869088f07b59967c9fe30beadddd25acfb28d2986db820a6a92f2d0d68
languageName: node
linkType: hard

"@metamask/snaps-rpc-methods@npm:^3.2.0":
"@metamask/snaps-rpc-methods@npm:^3.1.0, @metamask/snaps-rpc-methods@npm:^3.2.0":
version: 3.2.1
resolution: "@metamask/snaps-rpc-methods@npm:3.2.1"
dependencies:
Expand All @@ -2538,7 +2489,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/snaps-ui@npm:^3.0.1, @metamask/snaps-ui@npm:^3.1.0":
"@metamask/snaps-ui@npm:^3.1.0":
version: 3.1.0
resolution: "@metamask/snaps-ui@npm:3.1.0"
dependencies:
Expand All @@ -2549,36 +2500,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/snaps-utils@npm:^3.0.0, @metamask/snaps-utils@npm:^3.1.0":
version: 3.1.0
resolution: "@metamask/snaps-utils@npm:3.1.0"
dependencies:
"@babel/core": ^7.23.2
"@babel/types": ^7.23.0
"@metamask/base-controller": ^3.2.0
"@metamask/key-tree": ^9.0.0
"@metamask/permission-controller": ^5.0.0
"@metamask/rpc-errors": ^6.1.0
"@metamask/snaps-registry": ^2.1.0
"@metamask/snaps-ui": ^3.0.1
"@metamask/utils": ^8.1.0
"@noble/hashes": ^1.3.1
"@scure/base": ^1.1.1
chalk: ^4.1.2
cron-parser: ^4.5.0
fast-deep-equal: ^3.1.3
fast-json-stable-stringify: ^2.1.0
is-svg: ^4.4.0
rfdc: ^1.3.0
semver: ^7.5.4
ses: ^0.18.8
superstruct: ^1.0.3
validate-npm-package-name: ^5.0.0
checksum: 82f675e4eaf0ef928851450742b3378ce815ed6e7bdc77d6c20da21b6a95e5ea2627c9979e6a3655e91b04fa5565f78baa8b952826139d1485a22d0c81e10447
languageName: node
linkType: hard

"@metamask/snaps-utils@npm:^3.2.0":
"@metamask/snaps-utils@npm:^3.0.0, @metamask/snaps-utils@npm:^3.2.0":
version: 3.2.0
resolution: "@metamask/snaps-utils@npm:3.2.0"
dependencies:
Expand Down Expand Up @@ -2642,7 +2564,7 @@ __metadata:
fast-json-patch: ^3.1.1
jest: ^27.5.1
lodash: ^4.17.21
nonce-tracker: ^1.1.0
nonce-tracker: ^3.0.0
sinon: ^9.2.4
ts-jest: ^27.1.4
typedoc: ^0.24.8
Expand Down Expand Up @@ -3783,16 +3705,6 @@ __metadata:
languageName: node
linkType: hard

"assert@npm:^1.4.1":
version: 1.5.0
resolution: "assert@npm:1.5.0"
dependencies:
object-assign: ^4.1.1
util: 0.10.3
checksum: 9be48435f726029ae7020c5888a3566bf4d617687aab280827f2e4029644b6515a9519ea10d018b342147c02faf73d9e9419e780e8937b3786ee4945a0ca71e5
languageName: node
linkType: hard

"assert@npm:^2.0.0":
version: 2.0.0
resolution: "assert@npm:2.0.0"
Expand All @@ -3814,6 +3726,15 @@ __metadata:
languageName: node
linkType: hard

"async-mutex@npm:^0.3.1":
version: 0.3.2
resolution: "async-mutex@npm:0.3.2"
dependencies:
tslib: ^2.3.1
checksum: 620b771dfdea1cad0a6b712915c31a1e3ca880a8cf1eae92b4590f435995e0260929c6ebaae0b9126b1456790ea498064b5bb9a506948cda760f48d3d0dcc4c8
languageName: node
linkType: hard

"asynckit@npm:^0.4.0":
version: 0.4.0
resolution: "asynckit@npm:0.4.0"
Expand All @@ -3828,13 +3749,6 @@ __metadata:
languageName: node
linkType: hard

"await-semaphore@npm:^0.1.3":
version: 0.1.3
resolution: "await-semaphore@npm:0.1.3"
checksum: 334c86541e446378dd832168de431327a77146f70cd80b57c99cd483ce5996e3bfdadea9d795e36f0b4faacb5121f5f7a99d94297ac2bdafbc690e5b0aa5cc32
languageName: node
linkType: hard

"b4a@npm:^1.6.4":
version: 1.6.4
resolution: "b4a@npm:1.6.4"
Expand Down Expand Up @@ -5653,18 +5567,6 @@ __metadata:
languageName: node
linkType: hard

"ethjs-query@npm:^0.3.8":
version: 0.3.8
resolution: "ethjs-query@npm:0.3.8"
dependencies:
babel-runtime: ^6.26.0
ethjs-format: 0.2.7
ethjs-rpc: 0.2.0
promise-to-callback: ^1.0.0
checksum: 6673167101e793dfdbb212f3ee2e7449a7c1eb7f4d72aba04a1c504eb36d9148f18c42a702839ebce7534709d821f32adcca84c56b7900788b2875cba8a371f1
languageName: node
linkType: hard

"ethjs-rpc@npm:0.2.0":
version: 0.2.0
resolution: "ethjs-rpc@npm:0.2.0"
Expand Down Expand Up @@ -6640,13 +6542,6 @@ __metadata:
languageName: node
linkType: hard

"inherits@npm:2.0.1":
version: 2.0.1
resolution: "inherits@npm:2.0.1"
checksum: 6536b9377296d4ce8ee89c5c543cb75030934e61af42dba98a428e7d026938c5985ea4d1e3b87743a5b834f40ed1187f89c2d7479e9d59e41d2d1051aefba07b
languageName: node
linkType: hard

"ini@npm:^1.3.4":
version: 1.3.8
resolution: "ini@npm:1.3.8"
Expand Down Expand Up @@ -8516,14 +8411,13 @@ __metadata:
languageName: node
linkType: hard

"nonce-tracker@npm:^1.1.0":
version: 1.1.0
resolution: "nonce-tracker@npm:1.1.0"
"nonce-tracker@npm:^3.0.0":
version: 3.0.0
resolution: "nonce-tracker@npm:3.0.0"
dependencies:
assert: ^1.4.1
await-semaphore: ^0.1.3
ethjs-query: ^0.3.8
checksum: fbed4eac51a5df3922a9ee93f2d40f700d3c86e03ac02acc5c7983e9fd5c9d97278f1f5d8422f2dad0f0108c09a2d880145906cae19604717cc898d385bbdff9
"@ethersproject/providers": ^5.7.2
async-mutex: ^0.3.1
checksum: f679e83359c3d0b1941cb8569057445b5430b7e5645216442c256b2061ffb08ebee07e15011d3d55acf75710e054abd924c1b1bb38847956ef9f3bb7eed622d4
languageName: node
linkType: hard

Expand Down Expand Up @@ -8599,13 +8493,6 @@ __metadata:
languageName: node
linkType: hard

"object-assign@npm:^4.1.1":
version: 4.1.1
resolution: "object-assign@npm:4.1.1"
checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f
languageName: node
linkType: hard

"object-inspect@npm:^1.12.3, object-inspect@npm:^1.9.0":
version: 1.12.3
resolution: "object-inspect@npm:1.12.3"
Expand Down Expand Up @@ -10251,10 +10138,10 @@ __metadata:
languageName: node
linkType: hard

"tslib@npm:^2.0.0, tslib@npm:^2.3.0, tslib@npm:^2.5.0, tslib@npm:^2.6.0":
version: 2.6.0
resolution: "tslib@npm:2.6.0"
checksum: c01066038f950016a18106ddeca4649b4d76caa76ec5a31e2a26e10586a59fceb4ee45e96719bf6c715648e7c14085a81fee5c62f7e9ebee68e77a5396e5538f
"tslib@npm:^2.0.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.5.0, tslib@npm:^2.6.0":
version: 2.6.2
resolution: "tslib@npm:2.6.2"
checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad
languageName: node
linkType: hard

Expand Down Expand Up @@ -10512,15 +10399,6 @@ __metadata:
languageName: node
linkType: hard

"util@npm:0.10.3":
version: 0.10.3
resolution: "util@npm:0.10.3"
dependencies:
inherits: 2.0.1
checksum: bd800f5d237a82caddb61723a6cbe45297d25dd258651a31335a4d5d981fd033cb4771f82db3d5d59b582b187cb69cfe727dc6f4d8d7826f686ee6c07ce611e0
languageName: node
linkType: hard

"util@npm:^0.12.0":
version: 0.12.5
resolution: "util@npm:0.12.5"
Expand Down
Loading