Skip to content

Commit

Permalink
feat: show balances in /accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
acifani committed May 23, 2024
1 parent 33ef5ab commit bb71eb3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion actual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ export async function shutdown() {
}

export async function getAccounts() {
return api.getAccounts();
const accounts = await api.getAccounts();
return Promise.all(
accounts.map(async (a: any) => ({
...a,
balance: await getAccountBalance(a.id),
})),
);
}

export async function getAccount(id: string) {
Expand Down

0 comments on commit bb71eb3

Please sign in to comment.