1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 23:45:21 +02:00

Add auto-update strategies for current balance on manual accounts (#2460)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

* Add auto-update strategies for current balance on manual accounts

* Remove deprecated BalanceUpdater, replace with new methods
This commit is contained in:
Zach Gollwitzer 2025-07-17 06:49:56 -04:00 committed by GitHub
parent 52333e3fa6
commit 3eea5a9891
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 311 additions and 136 deletions

View file

@ -10,7 +10,9 @@ module Account::Anchorable
end
def set_opening_anchor_balance(**opts)
opening_balance_manager.set_opening_balance(**opts)
result = opening_balance_manager.set_opening_balance(**opts)
sync_later if result.success?
result
end
def opening_anchor_date
@ -25,8 +27,10 @@ module Account::Anchorable
opening_balance_manager.has_opening_anchor?
end
def set_current_anchor_balance(balance)
current_balance_manager.set_current_balance(balance)
def set_current_balance(balance)
result = current_balance_manager.set_current_balance(balance)
sync_later if result.success?
result
end
def current_anchor_balance