File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1- import {
2- isPlainObject ,
1+ import type {
32 Json ,
43 JsonRpcError as SerializedJsonRpcError ,
54} from '@metamask/utils' ;
5+ import { isPlainObject } from '@metamask/utils' ;
66import safeStringify from 'fast-safe-stringify' ;
77
88import type { OptionalDataWithOptionalCause } from './utils' ;
Original file line number Diff line number Diff line change 11import { JsonRpcError , EthereumProviderError } from './classes' ;
22import { errorCodes } from './error-constants' ;
3- import { OptionalDataWithOptionalCause , getMessageFromCode } from './utils' ;
3+ import type { OptionalDataWithOptionalCause } from './utils' ;
4+ import { getMessageFromCode } from './utils' ;
45
56type EthereumErrorOptions < Cause extends OptionalDataWithOptionalCause > = {
67 message ?: string ;
@@ -25,8 +26,9 @@ export const rpcErrors = {
2526 * @param arg - The error message or options bag.
2627 * @returns An instance of the {@link JsonRpcError} class.
2728 */
28- parse : < Cause extends OptionalDataWithOptionalCause > ( arg ?: JsonRpcErrorsArg < Cause > ) =>
29- getJsonRpcError ( errorCodes . rpc . parse , arg ) ,
29+ parse : < Cause extends OptionalDataWithOptionalCause > (
30+ arg ?: JsonRpcErrorsArg < Cause > ,
31+ ) => getJsonRpcError ( errorCodes . rpc . parse , arg ) ,
3032
3133 /**
3234 * Get a JSON RPC 2.0 Invalid Request (-32600) error.
Original file line number Diff line number Diff line change 1+ import type {
2+ Json ,
3+ JsonRpcError as SerializedJsonRpcError ,
4+ RuntimeObject ,
5+ } from '@metamask/utils' ;
16import {
27 hasProperty ,
38 isValidJson ,
49 isObject ,
510 isJsonRpcError ,
6- Json ,
7- JsonRpcError as SerializedJsonRpcError ,
8- RuntimeObject ,
911} from '@metamask/utils' ;
1012
1113import { errorCodes , errorValues } from './error-constants' ;
You can’t perform that action at this time.
0 commit comments