Skip to content

Commit c225780

Browse files
committed
Fix lint errors
1 parent 69b64c4 commit c225780

17 files changed

Lines changed: 25 additions & 44 deletions

File tree

packages/examples/packages/rollup-plugin/rollup.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line
21
import snaps from '@metamask/snaps-rollup-plugin';
32
import { babel } from '@rollup/plugin-babel';
43
import commonjs from '@rollup/plugin-commonjs';

packages/snaps-execution-environments/coverage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"branches": 90.74,
33
"functions": 94.96,
44
"lines": 90.86,
5-
"statements": 90.28
5+
"statements": 90.27
66
}

packages/snaps-execution-environments/src/common/test-utils/executor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Json, JsonRpcRequest, JsonRpcResponse } from '@metamask/utils';
1+
import type { JsonRpcRequest, JsonRpcResponse } from '@metamask/utils';
22
import type { DuplexOptions, Readable } from 'readable-stream';
33
import { Duplex } from 'readable-stream';
44

@@ -157,7 +157,7 @@ export class TestSnapExecutor extends BaseSnapExecutor {
157157

158158
public async writeRpc(message: {
159159
name: string;
160-
data: JsonRpcResponse<Json>;
160+
data: JsonRpcResponse;
161161
}): Promise<void> {
162162
return new Promise((resolve, reject) =>
163163
this.#rpcLeft.write(message, (error) => {

packages/snaps-execution-environments/src/common/validation.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
} from '@metamask/superstruct';
2525
import type {
2626
CaipChainId,
27-
Json,
2827
JsonRpcRequest,
2928
JsonRpcSuccess,
3029
} from '@metamask/utils';
@@ -372,7 +371,7 @@ type RequestParams<Params extends unknown[] | undefined> =
372371

373372
type RequestFunction<
374373
Args extends RequestArguments,
375-
ResponseType extends JsonRpcSuccess<Json>,
374+
ResponseType extends JsonRpcSuccess,
376375
> = (...args: RequestParams<Args>) => Promise<ResponseType['result']>;
377376

378377
export type Ping = RequestFunction<PingRequestArguments, OkResponse>;

packages/snaps-rpc-methods/src/permitted/experimentalProviderRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export type ProviderRequestParameters = InferMatching<
143143
*/
144144
async function providerRequestImplementation(
145145
req: JsonRpcRequest<ProviderRequestParams>,
146-
res: PendingJsonRpcResponse<ProviderRequestResult>,
146+
res: PendingJsonRpcResponse,
147147
_next: unknown,
148148
end: JsonRpcEngineEndCallback,
149149
{

packages/snaps-rpc-methods/src/permitted/getState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export type GetStateParameters = InferMatching<
9191
*/
9292
async function getStateImplementation(
9393
request: JsonRpcRequest<GetStateParameters>,
94-
response: PendingJsonRpcResponse<GetStateResult>,
94+
response: PendingJsonRpcResponse,
9595
_next: unknown,
9696
end: JsonRpcEngineEndCallback,
9797
{ hasPermission, getSnapState, getUnlockPromise }: GetStateHooks,

packages/snaps-rpc-methods/src/permitted/invokeKeyring.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export type InvokeKeyringHooks = {
7171
*/
7272
async function invokeKeyringImplementation(
7373
req: JsonRpcRequest<InvokeKeyringParams>,
74-
res: PendingJsonRpcResponse<InvokeKeyringResult>,
74+
res: PendingJsonRpcResponse,
7575
_next: unknown,
7676
end: JsonRpcEngineEndCallback,
7777
{

packages/snaps-rpc-methods/src/permitted/invokeSnapSugar.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
JsonRpcEngineNextCallback,
44
} from '@metamask/json-rpc-engine';
55
import { rpcErrors } from '@metamask/rpc-errors';
6-
import type { InvokeSnapParams, InvokeSnapResult } from '@metamask/snaps-sdk';
6+
import type { InvokeSnapParams } from '@metamask/snaps-sdk';
77
import type { PendingJsonRpcResponse } from '@metamask/utils';
88
import { assertIsJsonRpcSuccess, jsonrpc2 } from '@metamask/utils';
99

@@ -21,7 +21,7 @@ describe('wallet_invokeSnap', () => {
2121
({
2222
id: 'some-id',
2323
jsonrpc: jsonrpc2,
24-
}) as PendingJsonRpcResponse<InvokeSnapResult>;
24+
}) as PendingJsonRpcResponse;
2525

2626
it('invokes snap using hook', async () => {
2727
const params = {

packages/snaps-rpc-methods/src/permitted/invokeSnapSugar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export type InvokeSnapSugarHooks = {
4343
*/
4444
export async function invokeSnapSugar(
4545
req: JsonRpcRequest<InvokeSnapParams>,
46-
res: PendingJsonRpcResponse<InvokeSnapResult>,
46+
res: PendingJsonRpcResponse,
4747
_next: JsonRpcEngineNextCallback,
4848
end: JsonRpcEngineEndCallback,
4949
{ invokeSnap }: InvokeSnapSugarHooks,

packages/snaps-simulation/src/middleware/internal-methods/accounts.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import type {
33
JsonRpcEngineNextCallback,
44
} from '@metamask/json-rpc-engine';
55
import { BIP44Node } from '@metamask/key-tree';
6-
import type {
7-
Json,
8-
JsonRpcRequest,
9-
PendingJsonRpcResponse,
10-
} from '@metamask/utils';
6+
import type { JsonRpcRequest, PendingJsonRpcResponse } from '@metamask/utils';
117

128
export type GetAccountsHandlerHooks = {
139
getMnemonic: () => Promise<Uint8Array>;
@@ -28,7 +24,7 @@ export type GetAccountsHandlerHooks = {
2824
*/
2925
export async function getAccountsHandler(
3026
_request: JsonRpcRequest,
31-
response: PendingJsonRpcResponse<Json>,
27+
response: PendingJsonRpcResponse,
3228
_next: JsonRpcEngineNextCallback,
3329
end: JsonRpcEngineEndCallback,
3430
hooks: GetAccountsHandlerHooks,

0 commit comments

Comments
 (0)