Skip to content

Commit

Permalink
Update "@metamask/rpc-errors" to version "^5.1.1"
Browse files Browse the repository at this point in the history
This commit updates "@metamask/rpc-errors" package to version "^5.1.1" in package.json and yarn.lock files. This will resolve an issue related to an internal error in PermissionController caused by this dependency.
  • Loading branch information
Mrtenz committed Apr 19, 2023
1 parent 3a40ec6 commit e26ff17
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/permission-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@metamask/base-controller": "workspace:^",
"@metamask/controller-utils": "workspace:^",
"@metamask/json-rpc-engine": "^7.0.0",
"@metamask/rpc-errors": "^5.0.0",
"@metamask/rpc-errors": "^5.1.1",
"@metamask/utils": "^5.0.1",
"@types/deep-freeze-strict": "^1.1.0",
"deep-freeze-strict": "^1.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/permission-controller/src/PermissionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@ export class PermissionController<
);
} catch (error) {
throw internalError('Unexpected error in side-effects', {
error: serializeError(error),
cause: error,
});
}
}
Expand Down Expand Up @@ -2196,7 +2196,7 @@ export class PermissionController<

/* istanbul ignore next: should never happen */
throw internalError('Unrecognized error type', {
error: serializeError(error),
cause: error,
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/permission-controller/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
rpcErrors,
providerErrors,
JsonRpcError,
DataWithOptionalCause,
} from '@metamask/rpc-errors';
import { Json } from '@metamask/utils';
import { PermissionType } from './Permission';
Expand Down Expand Up @@ -79,7 +80,7 @@ export function userRejectedRequest<Data extends Record<string, Json>>(
* @param data - Optional data to add extra context
* @returns The built error
*/
export function internalError<Data extends Record<string, Json>>(
export function internalError<Data extends DataWithOptionalCause>(
message: string,
data?: Data,
): JsonRpcError<Data> {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ __metadata:
"@metamask/base-controller": "workspace:^"
"@metamask/controller-utils": "workspace:^"
"@metamask/json-rpc-engine": ^7.0.0
"@metamask/rpc-errors": ^5.0.0
"@metamask/rpc-errors": ^5.1.1
"@metamask/utils": ^5.0.1
"@types/deep-freeze-strict": ^1.1.0
"@types/jest": ^26.0.22
Expand Down Expand Up @@ -1752,13 +1752,13 @@ __metadata:
languageName: unknown
linkType: soft

"@metamask/rpc-errors@npm:^5.0.0":
version: 5.0.0
resolution: "@metamask/rpc-errors@npm:5.0.0"
"@metamask/rpc-errors@npm:^5.0.0, @metamask/rpc-errors@npm:^5.1.1":
version: 5.1.1
resolution: "@metamask/rpc-errors@npm:5.1.1"
dependencies:
"@metamask/utils": ^5.0.0
fast-safe-stringify: ^2.0.6
checksum: fbcb21ad1460883ee9d28f487d9cf5de7d3c6ac819024a1b6e5732d5da9a9f275f19fa0b4daa06dbd9b45d89c9e50ab9f281d597324e36d3324fbc9ebfdf0ba8
checksum: ccd1b24da66af3ae63960b79c04b86efb8b96acb89ca6f7e0bbfe636d23ba5cddeba533c0692eafb87c44ec6f840085372d0f21b39e05df9a80700ff61538a30
languageName: node
linkType: hard

Expand Down

0 comments on commit e26ff17

Please sign in to comment.