Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
17fd0689
Unverified
Commit
17fd0689
authored
6 months ago
by
Matt Fiddaman
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
update synced account balance in db if available (#3452)
parent
4e6a3bba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/loot-core/src/server/accounts/sync.ts
+10
-1
10 additions, 1 deletion
packages/loot-core/src/server/accounts/sync.ts
upcoming-release-notes/3452.md
+6
-0
6 additions, 0 deletions
upcoming-release-notes/3452.md
with
16 additions
and
1 deletion
packages/loot-core/src/server/accounts/sync.ts
+
10
−
1
View file @
17fd0689
...
...
@@ -54,6 +54,13 @@ function getAccountBalance(account) {
}
}
async
function
updateAccountBalance
(
id
,
balance
)
{
await
db
.
runQuery
(
'
UPDATE accounts SET balance_current = ? WHERE id = ?
'
,
[
amountToInteger
(
balance
),
id
,
]);
}
export
async
function
getGoCardlessAccounts
(
userId
,
userKey
,
id
)
{
const
userToken
=
await
asyncStorage
.
getItem
(
'
user-token
'
);
if
(
!
userToken
)
return
;
...
...
@@ -694,7 +701,7 @@ export async function syncAccount(
);
}
const
{
transactions
:
originalTransactions
}
=
download
;
const
{
transactions
:
originalTransactions
,
accountBalance
}
=
download
;
if
(
originalTransactions
.
length
===
0
)
{
return
{
added
:
[],
updated
:
[]
};
...
...
@@ -713,6 +720,8 @@ export async function syncAccount(
useStrictIdChecking
,
);
if
(
accountBalance
)
await
updateAccountBalance
(
id
,
accountBalance
);
return
result
;
});
}
else
{
...
...
This diff is collapsed.
Click to expand it.
upcoming-release-notes/3452.md
0 → 100644
+
6
−
0
View file @
17fd0689
---
category
:
Maintenance
authors
:
[
matt-fidd
]
---
Update synced account balance in db if available
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment