mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
Fix credit card balance history (#2414)
This commit is contained in:
parent
4b50acff2b
commit
f3ab4a27ee
1 changed files with 5 additions and 2 deletions
|
@ -84,9 +84,12 @@ class PlaidAccount::Processor
|
|||
if plaid_account.plaid_type == "investment"
|
||||
@balance_calculator ||= PlaidAccount::Investments::BalanceCalculator.new(plaid_account, security_resolver: security_resolver)
|
||||
else
|
||||
balance = plaid_account.current_balance || plaid_account.available_balance || 0
|
||||
|
||||
# We don't currently distinguish "cash" vs. "non-cash" balances for non-investment accounts.
|
||||
OpenStruct.new(
|
||||
balance: plaid_account.current_balance || plaid_account.available_balance,
|
||||
cash_balance: plaid_account.available_balance || 0
|
||||
balance: balance,
|
||||
cash_balance: balance
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue