Avoid adding setup toast in the middle of setup
This improves the experience of going through secret storage setup / reset flows by avoiding intermittent toasts that appear and disappear in the middle of the operation.
This commit is contained in:
@@ -35,6 +35,17 @@ function isCachingAllowed() {
|
||||
return secretStorageBeingAccessed;
|
||||
}
|
||||
|
||||
/**
|
||||
* This can be used by other components to check if secret storage access is in
|
||||
* progress, so that we can e.g. avoid intermittently showing toasts during
|
||||
* secret storage setup.
|
||||
*
|
||||
* @returns {bool}
|
||||
*/
|
||||
export function isSecretStorageBeingAccessed() {
|
||||
return secretStorageBeingAccessed;
|
||||
}
|
||||
|
||||
export class AccessCancelledError extends Error {
|
||||
constructor() {
|
||||
super("Secret storage access canceled");
|
||||
|
||||
Reference in New Issue
Block a user