mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Preserve original transaction names when enriching (#1556)
* Preserve original transaction name * Remove stale method * Fix tests
This commit is contained in:
parent
68617514b0
commit
7be6a372bf
22 changed files with 100 additions and 76 deletions
|
@ -26,11 +26,6 @@ class Account::Trade < ApplicationRecord
|
|||
qty > 0
|
||||
end
|
||||
|
||||
def name
|
||||
prefix = sell? ? "Sell " : "Buy "
|
||||
prefix + "#{qty.abs} shares of #{security.ticker}"
|
||||
end
|
||||
|
||||
def unrealized_gain_loss
|
||||
return nil if sell?
|
||||
current_price = security.current_price
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue