mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 23:14:10 +00:00
Fix credit card balance history (#2414)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user