Skip to content

Commit e38e3e7

Browse files
GudahttGuillaumeRx
andauthored
Remove obsolete comments
Co-authored-by: Guillaume Roux <guillaumeroux123@gmail.com>
1 parent e0486f3 commit e38e3e7

File tree

9 files changed

+0
-22
lines changed

9 files changed

+0
-22
lines changed

packages/chain-agnostic-permission/src/scope/filter.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ describe('filter', () => {
7272

7373
it('returns supported and unsupported scopes', () => {
7474
MockAssert.assertScopeSupported.mockImplementation((scopeString) => {
75-
// This is okay; we are inside of a mock.
7675
if (scopeString === 'eip155:1') {
7776
throw new Error('scope not supported');
7877
}
@@ -173,11 +172,9 @@ describe('filter', () => {
173172
it('returns only supported methods', () => {
174173
MockSupported.isSupportedMethod.mockImplementation(
175174
(scopeString, method) => {
176-
// This is okay; we are inside of a mock.
177175
if (scopeString === 'eip155:1' && method === 'method1') {
178176
return false;
179177
}
180-
// This is okay; we are inside of a mock.
181178
if (scopeString === 'eip155:5' && method === 'methodB') {
182179
return false;
183180
}
@@ -258,11 +255,9 @@ describe('filter', () => {
258255
it('returns only supported notifications', () => {
259256
MockSupported.isSupportedNotification.mockImplementation(
260257
(scopeString, notification) => {
261-
// This is okay; we are inside of a mock.
262258
if (scopeString === 'eip155:1' && notification === 'notification1') {
263259
return false;
264260
}
265-
// This is okay; we are inside of a mock.
266261
if (scopeString === 'eip155:5' && notification === 'notificationB') {
267262
return false;
268263
}

packages/controller-utils/src/create-service-policy.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// We use conditions exclusively in this file.
2-
31
import { handleWhen } from 'cockatiel';
42
import { useFakeTimers } from 'sinon';
53
import type { SinonFakeTimers } from 'sinon';

packages/network-controller/src/rpc-service/rpc-service-chain.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ describe('RpcServiceChain', () => {
451451
onRetryListener.mock.calls.reduce(
452452
(memo, call) => {
453453
const { endpointUrl } = call[0];
454-
// There is nothing wrong with this.
455454
memo[endpointUrl] = (memo[endpointUrl] ?? 0) + 1;
456455
return memo;
457456
},
@@ -680,7 +679,6 @@ describe('RpcServiceChain', () => {
680679
onDegradedListener.mock.calls.reduce(
681680
(memo: Record<string, number>, call) => {
682681
const { endpointUrl } = call[0];
683-
// There is nothing wrong with this.
684682
memo[endpointUrl] = (memo[endpointUrl] ?? 0) + 1;
685683
return memo;
686684
},

packages/network-controller/src/rpc-service/rpc-service.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// We use conditions exclusively in this file.
2-
31
import { HttpError } from '@metamask/controller-utils';
42
import { errorCodes } from '@metamask/rpc-errors';
53
import deepFreeze from 'deep-freeze-strict';

packages/network-controller/tests/NetworkController.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// A lot of the tests in this file have conditionals.
2-
31
import { deriveStateFromMetadata } from '@metamask/base-controller';
42
import {
53
BuiltInNetworkName,

packages/network-controller/tests/network-client/block-hash-in-response.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ export function testsForRpcMethodsThatCheckForBlockHashInResponse(
326326
},
327327
);
328328

329-
// This is not ideal, but we can refactor this later.
330329
if (providerType === NetworkClientType.Infura) {
331330
// This is not ideal, but we can refactor this later.
332331
// eslint-disable-next-line jest/no-conditional-expect

packages/network-controller/tests/network-client/block-param.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ export function testsForRpcMethodSupportingBlockParam(
403403
},
404404
);
405405

406-
// This is not ideal, but we can refactor this later.
407406
if (providerType === NetworkClientType.Infura) {
408407
// This is not ideal, but we can refactor this later.
409408
// eslint-disable-next-line jest/no-conditional-expect

packages/network-controller/tests/network-client/no-block-param.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ export function testsForRpcMethodAssumingNoBlockParam(
282282
},
283283
);
284284

285-
// This is not ideal, but we can refactor this later.
286285
if (providerType === NetworkClientType.Infura) {
287286
// This is not ideal, but we can refactor this later.
288287
// eslint-disable-next-line jest/no-conditional-expect

packages/network-controller/tests/network-client/rpc-failover.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export function testsForRpcFailoverBehavior({
5656
const request = requestToCall;
5757
const requestToMock = getRequestToMock(request, blockNumber);
5858
const additionalMockRpcCallOptions =
59-
// This condition is intentional.
6059
failure instanceof Error || typeof failure === 'string'
6160
? { error: failure }
6261
: { response: failure };
@@ -134,7 +133,6 @@ export function testsForRpcFailoverBehavior({
134133
const request = requestToCall;
135134
const requestToMock = getRequestToMock(request, blockNumber);
136135
const additionalMockRpcCallOptions =
137-
// This condition is intentional.
138136
failure instanceof Error || typeof failure === 'string'
139137
? { error: failure }
140138
: { response: failure };
@@ -224,7 +222,6 @@ export function testsForRpcFailoverBehavior({
224222
const request = requestToCall;
225223
const requestToMock = getRequestToMock(request, blockNumber);
226224
const additionalMockRpcCallOptions =
227-
// This condition is intentional.
228225
failure instanceof Error || typeof failure === 'string'
229226
? { error: failure }
230227
: { response: failure };
@@ -308,7 +305,6 @@ export function testsForRpcFailoverBehavior({
308305
it('allows RPC service options to be customized', async () => {
309306
const customMaxConsecutiveFailures = 6;
310307
const customMaxRetries = 2;
311-
// This is okay.
312308
const customNumRequestsToMake = isRetriableFailure
313309
? customMaxConsecutiveFailures / (customMaxRetries + 1)
314310
: customMaxConsecutiveFailures;
@@ -333,7 +329,6 @@ export function testsForRpcFailoverBehavior({
333329
const request = requestToCall;
334330
const requestToMock = getRequestToMock(request, blockNumber);
335331
const additionalMockRpcCallOptions =
336-
// This condition is intentional.
337332
failure instanceof Error || typeof failure === 'string'
338333
? { error: failure }
339334
: { response: failure };
@@ -366,7 +361,6 @@ export function testsForRpcFailoverBehavior({
366361
messenger,
367362
getRpcServiceOptions: (rpcEndpointUrl) => {
368363
const commonOptions = { fetch, btoa };
369-
// We need to return different results.
370364
if (rpcEndpointUrl === 'https://failover.endpoint') {
371365
const headers: HeadersInit = {
372366
'X-Baz': 'Qux',

0 commit comments

Comments
 (0)