Skip to content

Commit

Permalink
lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Aug 31, 2023
1 parent 9d0446a commit 3c29d01
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/classes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
isPlainObject,
import type {
Json,
JsonRpcError as SerializedJsonRpcError,
} from '@metamask/utils';
import { isPlainObject } from '@metamask/utils';
import safeStringify from 'fast-safe-stringify';

import type { OptionalDataWithOptionalCause } from './utils';
Expand Down
8 changes: 5 additions & 3 deletions src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { JsonRpcError, EthereumProviderError } from './classes';
import { errorCodes } from './error-constants';
import { OptionalDataWithOptionalCause, getMessageFromCode } from './utils';
import type { OptionalDataWithOptionalCause } from './utils';
import { getMessageFromCode } from './utils';

type EthereumErrorOptions<Cause extends OptionalDataWithOptionalCause> = {
message?: string;
Expand All @@ -25,8 +26,9 @@ export const rpcErrors = {
* @param arg - The error message or options bag.
* @returns An instance of the {@link JsonRpcError} class.
*/
parse: <Cause extends OptionalDataWithOptionalCause>(arg?: JsonRpcErrorsArg<Cause>) =>
getJsonRpcError(errorCodes.rpc.parse, arg),
parse: <Cause extends OptionalDataWithOptionalCause>(
arg?: JsonRpcErrorsArg<Cause>,
) => getJsonRpcError(errorCodes.rpc.parse, arg),

/**
* Get a JSON RPC 2.0 Invalid Request (-32600) error.
Expand Down
8 changes: 5 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type {
Json,
JsonRpcError as SerializedJsonRpcError,
RuntimeObject,
} from '@metamask/utils';
import {
hasProperty,
isValidJson,
isObject,
isJsonRpcError,
Json,
JsonRpcError as SerializedJsonRpcError,
RuntimeObject,
} from '@metamask/utils';

import { errorCodes, errorValues } from './error-constants';
Expand Down

0 comments on commit 3c29d01

Please sign in to comment.