Skip to content

A local-first personal finance app

🐛 fix new budget files not syncing (#1291)

Matiss Janis Aboltins6e0c84ccad61
diff --git a/packages/crdt/package.json b/packages/crdt/package.json
index 4e4ec24622..5cd121b6cb 100644
--- a/packages/crdt/package.json
+++ b/packages/crdt/package.json
@@ -1,6 +1,6 @@
{
"name": "@actual-app/crdt",
- "version": "2.0.0",
+ "version": "2.0.1",
"license": "MIT",
"description": "CRDT layer of Actual",
"main": "dist/index.js",
diff --git a/packages/crdt/src/crdt/merkle.ts b/packages/crdt/src/crdt/merkle.ts
index d77b4f8077..20899838ab 100644
--- a/packages/crdt/src/crdt/merkle.ts
+++ b/packages/crdt/src/crdt/merkle.ts
@@ -16,7 +16,7 @@ export type TrieNode = {
'0'?: TrieNode;
'1'?: TrieNode;
'2'?: TrieNode;
- hash: number;
+ hash?: number;
};
export function emptyTrie(): TrieNode {
diff --git a/packages/crdt/src/crdt/timestamp.ts b/packages/crdt/src/crdt/timestamp.ts
index 190924c7ea..1fe7d31f41 100644
--- a/packages/crdt/src/crdt/timestamp.ts
+++ b/packages/crdt/src/crdt/timestamp.ts
@@ -42,10 +42,7 @@ export function getClock(): Clock {
return clock;
}
-export function makeClock(
- timestamp: Timestamp,
- merkle: TrieNode = { hash: 0 },
-) {
+export function makeClock(timestamp: Timestamp, merkle: TrieNode = {}) {
return { timestamp: MutableTimestamp.from(timestamp), merkle };
}
diff --git a/upcoming-release-notes/1291.md b/upcoming-release-notes/1291.md
new file mode 100644
index 0000000000..79212423ab
--- /dev/null
+++ b/upcoming-release-notes/1291.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MatissJanis]
+---
+
+Fix new budget files not syncing correctly