chore: should validate password before deleting vault (#2400)

This commit is contained in:
Aman Harwara
2023-08-09 22:17:47 +05:30
committed by GitHub
parent 43e4e0e5f2
commit 875e8c3ee4
7 changed files with 98 additions and 0 deletions

View File

@@ -29,10 +29,17 @@ const VaultItem = ({ vault }: Props) => {
undefined,
ButtonType.Danger,
)
if (!confirm) {
return
}
const authorized = await application.vaults.authorizeVaultDeletion(vault)
if (!authorized.getValue()) {
return
}
if (vault.isSharedVaultListing()) {
const result = await application.sharedVaults.deleteSharedVault(vault)
if (isClientDisplayableError(result)) {