mirror of
https://github.com/we-promise/sure.git
synced 2026-05-25 13:34:58 +00:00
* Display multi-currency holdings correctly * Implement IBKR provider * Fix: Use historical exchange rate for historical prices * Add brokerage exchange rate for trades * Sync historical balances from IBKR * Add logos in activity history * Fix privacy mode blur in account view * Improve IBKR XML Flex report parser errors
23 lines
469 B
Ruby
23 lines
469 B
Ruby
class IbkrItem::SyncCompleteEvent
|
|
attr_reader :ibkr_item
|
|
|
|
def initialize(ibkr_item)
|
|
@ibkr_item = ibkr_item
|
|
end
|
|
|
|
def broadcast
|
|
ibkr_item.accounts.each do |account|
|
|
account.broadcast_sync_complete
|
|
end
|
|
|
|
ibkr_item.broadcast_replace_to(
|
|
ibkr_item.family,
|
|
target: "ibkr_item_#{ibkr_item.id}",
|
|
partial: "ibkr_items/ibkr_item",
|
|
locals: { ibkr_item: ibkr_item }
|
|
)
|
|
|
|
ibkr_item.family.broadcast_sync_complete
|
|
end
|
|
end
|