Skip to content

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

fix: make xxh3 work

thecodrr8a75890da95f
diff --git a/apps/web/src/common/db.js b/apps/web/src/common/db.js
index fd3605f68..a73f79bc2 100644
--- a/apps/web/src/common/db.js
+++ b/apps/web/src/common/db.js
@@ -7,6 +7,10 @@ import { EV, EVENTS } from "notes-core/common";
import { getCurrentHash, hashNavigate } from "../navigation";
import { isTesting } from "../utils/platform";
+global.HTMLParser = new DOMParser().parseFromString(
+ "<body></body>",
+ "text/html"
+);
/**
* @type {import("notes-core/api").default}
*/
@@ -22,10 +26,15 @@ async function initializeDatabase() {
SSE_HOST: "https://events.streetwriters.co",
});
} else {
+ // db.host({
+ // API_HOST: "http://localhost:5264",
+ // AUTH_HOST: "http://localhost:8264",
+ // SSE_HOST: "http://localhost:7264",
+ // });
db.host({
- API_HOST: "http://localhost:5264",
- AUTH_HOST: "http://localhost:8264",
- SSE_HOST: "http://localhost:7264",
+ API_HOST: "http://192.168.10.29:5264",
+ AUTH_HOST: "http://192.168.10.29:8264",
+ SSE_HOST: "http://192.168.10.29:7264",
});
}
diff --git a/apps/web/src/interfaces/fs.js b/apps/web/src/interfaces/fs.js
index 06be9f4cc..0b8a0fdc8 100644
--- a/apps/web/src/interfaces/fs.js
+++ b/apps/web/src/interfaces/fs.js
@@ -1,6 +1,5 @@
import NNCrypto from "./nncrypto/index";
import localforage from "localforage";
-import xxhash from "xxhash-wasm";
import { xxhash3 } from "hash-wasm";
import axios from "axios";
@@ -49,7 +48,7 @@ async function writeEncrypted(filename, { data, type, key }) {
async function hashBuffer(data) {
return {
- hash: xxhash3(data),
+ hash: await xxhash3(data),
type: "xxh3",
};
}