Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: add vault creation to premium features

thecodrr04855f4544b5
diff --git a/packages/core/api/vault.js b/packages/core/api/vault.js
index a09399d9b..51885a32c 100644
--- a/packages/core/api/vault.js
+++ b/packages/core/api/vault.js
@@ -28,6 +28,8 @@ export default class Vault {
* @returns {Promise<Boolean>}
*/
async create(password) {
+ if (!(await sendCheckUserStatusEvent(CHECK_IDS.vaultAdd))) return;
+
const vaultKey = await this._context.read("vaultKey");
if (!vaultKey || !vaultKey.cipher || !vaultKey.iv) {
const encryptedData = await this._context.encrypt(