Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
Fix unit tests.
Update Lavamoat policies.
  • Loading branch information
matthewwalsh0 committed Nov 13, 2024
1 parent f77045d commit 5ca3702
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 25 deletions.
1 change: 1 addition & 0 deletions app/scripts/lib/transaction/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe('Transaction metrics', () => {
type: TransactionType.simpleSend,
origin: ORIGIN_METAMASK,
chainId: mockChainId,
networkClientId: 'testNetworkClientId',
time: 1624408066355,
defaultGasEstimates: {
gas: '0x7b0d',
Expand Down
1 change: 1 addition & 0 deletions app/scripts/lib/transaction/smart-transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function withRequest<ReturnValue>(
},
type: TransactionType.simpleSend,
chainId: CHAIN_IDS.MAINNET,
networkClientId: 'testNetworkClientId',
time: 1624408066355,
defaultGasEstimates: {
gas: '0x7b0d',
Expand Down
10 changes: 8 additions & 2 deletions app/scripts/metamask-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import {
} from '@metamask/keyring-api';
import { ControllerMessenger } from '@metamask/base-controller';
import { LoggingController, LogType } from '@metamask/logging-controller';
import { TransactionController } from '@metamask/transaction-controller';
import {
CHAIN_IDS,
TransactionController,
} from '@metamask/transaction-controller';
import {
RatesController,
TokenListController,
Expand Down Expand Up @@ -1217,7 +1220,10 @@ describe('MetaMaskController', () => {
).toHaveBeenCalledTimes(1);
expect(
metamaskController.txController.wipeTransactions,
).toHaveBeenCalledWith(false, selectedAddressMock);
).toHaveBeenCalledWith({
address: selectedAddressMock,
chainId: CHAIN_IDS.MAINNET,
});
expect(
metamaskController.smartTransactionsController.wipeSmartTransactions,
).toHaveBeenCalledWith({
Expand Down
1 change: 0 additions & 1 deletion lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3142,7 +3142,6 @@
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eth-method-registry": true,
"fast-json-patch": true,
"lodash": true,
"uuid": true,
Expand Down
1 change: 0 additions & 1 deletion lavamoat/browserify/flask/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3142,7 +3142,6 @@
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eth-method-registry": true,
"fast-json-patch": true,
"lodash": true,
"uuid": true,
Expand Down
1 change: 0 additions & 1 deletion lavamoat/browserify/main/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3142,7 +3142,6 @@
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eth-method-registry": true,
"fast-json-patch": true,
"lodash": true,
"uuid": true,
Expand Down
1 change: 0 additions & 1 deletion lavamoat/browserify/mmi/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3234,7 +3234,6 @@
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eth-method-registry": true,
"fast-json-patch": true,
"lodash": true,
"uuid": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const CONFIRMATION_MOCK = genUnapprovedContractInteractionConfirmation({
const TRANSACTION_META_MOCK = {
id: TRANSACTION_ID_MOCK,
chainId: '0x5',
networkClientId: 'testNetworkClientId',
status: TransactionStatus.submitted,
type: TransactionType.contractInteraction,
txParams: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const CONFIRMATION_MOCK = genUnapprovedContractInteractionConfirmation({
const TRANSACTION_META_MOCK = {
id: TRANSACTION_ID_MOCK,
chainId: '0x5',
networkClientId: 'testNetworkClientId',
status: TransactionStatus.submitted,
type: TransactionType.contractInteraction,
txParams: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const CONFIRMATION_MOCK = genUnapprovedContractInteractionConfirmation({
const TRANSACTION_META_MOCK = {
id: TRANSACTION_ID_MOCK,
chainId: '0x5',
networkClientId: 'testNetworkClientId',
status: TransactionStatus.submitted,
type: TransactionType.contractInteraction,
txParams: {
Expand Down
20 changes: 1 addition & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5087,25 +5087,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/controller-utils@npm:^11.0.0, @metamask/controller-utils@npm:^11.0.2, @metamask/controller-utils@npm:^11.1.0, @metamask/controller-utils@npm:^11.2.0, @metamask/controller-utils@npm:^11.3.0, @metamask/controller-utils@npm:^11.4.0, @metamask/controller-utils@npm:^11.4.1, @metamask/controller-utils@npm:^11.4.2":
version: 11.4.2
resolution: "@metamask/controller-utils@npm:11.4.2"
dependencies:
"@ethereumjs/util": "npm:^8.1.0"
"@metamask/eth-query": "npm:^4.0.0"
"@metamask/ethjs-unit": "npm:^0.3.0"
"@metamask/utils": "npm:^10.0.0"
"@spruceid/siwe-parser": "npm:2.1.0"
"@types/bn.js": "npm:^5.1.5"
bignumber.js: "npm:^9.1.2"
bn.js: "npm:^5.2.1"
eth-ens-namehash: "npm:^2.0.8"
fast-deep-equal: "npm:^3.1.3"
checksum: 10/fdae49ee97e7a2a1bb6414011ca59932f8712a768a9c4c43673a2504c9fa9e61d83df53a21ff0506ef6a8cf774704f2df58a6d71385c8786ec5cab4359c051e1
languageName: node
linkType: hard

"@metamask/controller-utils@npm:^11.4.3":
"@metamask/controller-utils@npm:^11.0.0, @metamask/controller-utils@npm:^11.0.2, @metamask/controller-utils@npm:^11.1.0, @metamask/controller-utils@npm:^11.2.0, @metamask/controller-utils@npm:^11.3.0, @metamask/controller-utils@npm:^11.4.0, @metamask/controller-utils@npm:^11.4.1, @metamask/controller-utils@npm:^11.4.2, @metamask/controller-utils@npm:^11.4.3":
version: 11.4.3
resolution: "@metamask/controller-utils@npm:11.4.3"
dependencies:
Expand Down

0 comments on commit 5ca3702

Please sign in to comment.