diff --git a/src/classes.ts b/src/classes.ts index b2ef6c4..803acdf 100644 --- a/src/classes.ts +++ b/src/classes.ts @@ -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'; diff --git a/src/errors.ts b/src/errors.ts index 79a4be9..bd09b82 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -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 = { message?: string; @@ -25,8 +26,9 @@ export const rpcErrors = { * @param arg - The error message or options bag. * @returns An instance of the {@link JsonRpcError} class. */ - parse: (arg?: JsonRpcErrorsArg) => - getJsonRpcError(errorCodes.rpc.parse, arg), + parse: ( + arg?: JsonRpcErrorsArg, + ) => getJsonRpcError(errorCodes.rpc.parse, arg), /** * Get a JSON RPC 2.0 Invalid Request (-32600) error. diff --git a/src/utils.ts b/src/utils.ts index fb613a3..e3328a7 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -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';