1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Match Plaid holding values on current day (#2212)

* Match Plaid holding values on current day

* Fix chart timezone issue

* Add timezone tests for syncs

* Hide sidebars on trades test
This commit is contained in:
Zach Gollwitzer 2025-05-06 09:25:49 -04:00 committed by GitHub
parent 470b753833
commit 2000f05453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 242 additions and 21 deletions

View file

@ -40,12 +40,11 @@ class Holding::BaseCalculator
new_quantities
end
def build_holdings(portfolio, date)
def build_holdings(portfolio, date, price_source: nil)
portfolio.map do |security_id, qty|
price = portfolio_cache.get_price(security_id, date)
price = portfolio_cache.get_price(security_id, date, source: price_source)
if price.nil?
Rails.logger.warn "No price found for security #{security_id} on #{date}"
next
end