@metamask-previews/approval-controller
Advanced tools
Comparing version 4.0.1-preview.e3b05ea to 4.1.0-preview.08312b7
@@ -9,2 +9,7 @@ # Changelog | ||
## [4.1.0] | ||
### Added | ||
- Add `show` option for `startFlow` ([#1886](https://github.com/MetaMask/core/pull/1886)) | ||
- This option lets you initiate a new approval flow without triggering the UI immediately. | ||
## [4.0.1] | ||
@@ -90,3 +95,4 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.1...HEAD | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.1.0...HEAD | ||
[4.1.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.1...@metamask/approval-controller@4.1.0 | ||
[4.0.1]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@4.0.0...@metamask/approval-controller@4.0.1 | ||
@@ -93,0 +99,0 @@ [4.0.0]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@3.5.2...@metamask/approval-controller@4.0.0 |
@@ -103,3 +103,5 @@ import type { RestrictedControllerMessenger } from '@metamask/base-controller'; | ||
}; | ||
export declare type StartFlowOptions = OptionalField<ApprovalFlow, 'id' | 'loadingText'>; | ||
export declare type StartFlowOptions = OptionalField<ApprovalFlow, 'id' | 'loadingText'> & { | ||
show?: boolean; | ||
}; | ||
export declare type EndFlowOptions = Pick<ApprovalFlow, 'id'>; | ||
@@ -397,2 +399,3 @@ export declare type SetFlowLoadingTextOptions = ApprovalFlow; | ||
* @param opts.loadingText - The loading text that will be associated to the approval flow. | ||
* @param opts.show - A flag to determine whether the approval should show to the user. | ||
* @returns The object containing the approval flow id. | ||
@@ -399,0 +402,0 @@ */ |
@@ -299,2 +299,3 @@ "use strict"; | ||
* @param opts.loadingText - The loading text that will be associated to the approval flow. | ||
* @param opts.show - A flag to determine whether the approval should show to the user. | ||
* @returns The object containing the approval flow id. | ||
@@ -309,3 +310,6 @@ */ | ||
}); | ||
__classPrivateFieldGet(this, _ApprovalController_showApprovalRequest, "f").call(this); | ||
// By default, if nothing else is specified, we always show the approval. | ||
if (opts.show !== false) { | ||
__classPrivateFieldGet(this, _ApprovalController_showApprovalRequest, "f").call(this); | ||
} | ||
return { id, loadingText }; | ||
@@ -312,0 +316,0 @@ } |
{ | ||
"name": "@metamask-previews/approval-controller", | ||
"version": "4.0.1-preview.e3b05ea", | ||
"version": "4.1.0-preview.08312b7", | ||
"description": "Manages requests that require user approval", | ||
@@ -39,3 +39,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@metamask/auto-changelog": "^3.4.0", | ||
"@metamask/auto-changelog": "^3.4.2", | ||
"@types/jest": "^27.4.1", | ||
@@ -42,0 +42,0 @@ "deepmerge": "^4.2.2", |
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
110059
1005