awesominat / stonks

The ideal investment platform
1 stars 0 forks source link

Add currentPrices to DashboardState #137

Closed gursi26 closed 9 months ago

gursi26 commented 9 months ago

When the owned stocks table with be implemented in the DashboardView, it should be accompanied by the addition of a List\<Double> type to the DashboardState called currentStockPrices (or something similar), which contains the current stock price of the parallel element in ownedTickers.

This is necessary to reduce the number of API calls required when opening the SellView, since updated stock prices could simply be grabbed from DashboardState.

As of right now, this is not implemented, and the DashboardView simply shows an owned stocks table containing the name of a ticker and the amount owned by the user. It should also contain the current price of the stock owned by the user and the price at which the stock was bought, along with the difference in price so that the user knows whether it is profitable to sell.

gursi26 commented 9 months ago

Completed in #148