Revert "Use API getAccountBalance"

This reverts commit aca6e0145b.
This commit is contained in:
Robert Dyer
2024-08-24 14:48:55 -05:00
parent a1310abe21
commit afb3df018e
6 changed files with 23 additions and 10 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
const api = require('@actual-app/api');
const jsdom = require("jsdom");
const { closeBudget, ensurePayee, getAccountNote, getLastTransactionDate, getTagValue, openBudget, setAccountNote, sleep } = require('./utils');
const { closeBudget, ensurePayee, getAccountBalance, getAccountNote, getLastTransactionDate, getTagValue, openBudget, setAccountNote, sleep } = require('./utils');
require("dotenv").config();
async function getKBB(URL) {
@@ -52,7 +52,7 @@ async function getKBB(URL) {
console.log('Fetching KBB for account:', account.name);
const kbb = await getKBB(URL);
const balance = await api.getAccountBalance(account);
const balance = await getAccountBalance(account);
const diff = kbb - balance;
console.log('KBB:', kbb);