Skip to content

A local-first personal finance app

fix defaultCleared options not used when importTransactions (#5247)

Ngoc Do84dec137bbb2
diff --git a/packages/loot-core/src/server/accounts/app.ts b/packages/loot-core/src/server/accounts/app.ts
index 69d611e003..cd3888cc7f 100644
--- a/packages/loot-core/src/server/accounts/app.ts
+++ b/packages/loot-core/src/server/accounts/app.ts
@@ -1091,7 +1091,7 @@ async function importTransactions({
transactions: ImportTransactionEntity[];
isPreview: boolean;
opts?: {
- defaultCleared: boolean;
+ defaultCleared?: boolean;
};
}): Promise<ImportTransactionsResult> {
if (typeof accountId !== 'string') {
diff --git a/packages/loot-core/src/server/api.ts b/packages/loot-core/src/server/api.ts
index a697ff1058..9b3b58da71 100644
--- a/packages/loot-core/src/server/api.ts
+++ b/packages/loot-core/src/server/api.ts
@@ -480,12 +480,14 @@ handlers['api/transactions-import'] = withMutation(async function ({
accountId,
transactions,
isPreview = false,
+ opts,
}) {
checkFileOpen();
return handlers['transactions-import']({
accountId,
transactions,
isPreview,
+ opts,
});
});
diff --git a/upcoming-release-notes/5247.md b/upcoming-release-notes/5247.md
new file mode 100644
index 0000000000..840924690f
--- /dev/null
+++ b/upcoming-release-notes/5247.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [ngoc-minh-do]
+---
+
+Fix issue that importTransactions() options (defaultCleared) was not used