@metamask/approval-controller
Advanced tools
Comparing version 5.0.0 to 5.1.0
@@ -9,2 +9,6 @@ # Changelog | ||
## [5.1.0] | ||
### Added | ||
- Add `title` and `icon` options to `success` and `error` methods ([#3675](https://github.com/MetaMask/core/pull/3675)) | ||
## [5.0.0] | ||
@@ -101,3 +105,4 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@5.0.0...HEAD | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@5.1.0...HEAD | ||
[5.1.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@5.0.0...@metamask/approval-controller@5.1.0 | ||
[5.0.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.1.0...@metamask/approval-controller@5.0.0 | ||
@@ -104,0 +109,0 @@ [4.1.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.1...@metamask/approval-controller@4.1.0 |
@@ -18,2 +18,4 @@ import type { ControllerGetStateAction } from '@metamask/base-controller'; | ||
header?: (string | ResultComponent)[]; | ||
icon?: string | null; | ||
title?: string | null; | ||
}; | ||
@@ -418,2 +420,4 @@ export declare type ApprovalRequest<RequestData extends ApprovalRequestData> = { | ||
* @param opts.flowToEnd - The ID of the approval flow to end once the success page is approved. | ||
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`. | ||
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`. | ||
* @returns Empty object to support future additions. | ||
@@ -429,2 +433,4 @@ */ | ||
* @param opts.flowToEnd - The ID of the approval flow to end once the error page is approved. | ||
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`. | ||
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`. | ||
* @returns Empty object to support future additions. | ||
@@ -431,0 +437,0 @@ */ |
@@ -288,3 +288,2 @@ "use strict"; | ||
this.update((draftState) => { | ||
// Typecast: ts(2589) | ||
draftState.pendingApprovals[opts.id].requestState = | ||
@@ -357,2 +356,4 @@ opts.requestState; | ||
* @param opts.flowToEnd - The ID of the approval flow to end once the success page is approved. | ||
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`. | ||
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`. | ||
* @returns Empty object to support future additions. | ||
@@ -365,2 +366,4 @@ */ | ||
header: opts.header, | ||
title: opts.title, | ||
icon: opts.icon, | ||
}); | ||
@@ -377,2 +380,4 @@ return {}; | ||
* @param opts.flowToEnd - The ID of the approval flow to end once the error page is approved. | ||
* @param opts.title - The title to display above the message. Shown by default but can be hidden with `null`. | ||
* @param opts.icon - The icon to display in the page. Shown by default but can be hidden with `null`. | ||
* @returns Empty object to support future additions. | ||
@@ -385,2 +390,4 @@ */ | ||
header: opts.header, | ||
title: opts.title, | ||
icon: opts.icon, | ||
}); | ||
@@ -448,3 +455,2 @@ return {}; | ||
this.update((draftState) => { | ||
// Typecast: ts(2589) | ||
draftState.pendingApprovals[id] = approval; | ||
@@ -451,0 +457,0 @@ draftState.pendingApprovalCount = Object.keys(draftState.pendingApprovals).length; |
{ | ||
"name": "@metamask/approval-controller", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "Manages requests that require user approval", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112400
1010