Skip to content

Commit

Permalink
Keep color green for no change
Browse files Browse the repository at this point in the history
  • Loading branch information
rssnyder committed Mar 28, 2021
1 parent 9ecdecc commit 69d20d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async def stock_update_activity(self, ticker: str, name: str, change_nick: bool
diff = round(raw_diff, 2)

if not getenv('POST_MARKET_PRICE'):
if diff > 0:
if diff >= 0.0:
change_up = True
diff = '+' + str(diff)
else:
Expand All @@ -180,7 +180,7 @@ async def stock_update_activity(self, ticker: str, name: str, change_nick: bool
else:
raw_diff = price_data.get('regularMarketChange', {}).get('raw', 0.00)
diff = round(raw_diff, 2)
if diff > 0:
if diff >= 0.0:
diff = '+' + str(diff)
else:
change_up = False
Expand Down Expand Up @@ -319,7 +319,7 @@ async def crypto_update_activity(self, ticker: str, crypto_name: str, change_nic
price = data.get('market_data', {}).get('current_price', {}).get(CURRENCY, 0.0)
change = data.get('market_data', {}).get('price_change_24h', 0)
change_header = ''
if change > 0:
if change >= 0.0:
change_header = '+'
else:
change_up = False
Expand Down

0 comments on commit 69d20d9

Please sign in to comment.