Skip to content

Commit

Permalink
refactor: dont send a notification for every fee change
Browse files Browse the repository at this point in the history
  • Loading branch information
jackstar12 committed Jan 23, 2025
1 parent 5665847 commit 6f1de83
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ async def check_fees(
):
for from_currency, pairs in current.items():
for to_currency, fee in pairs.items():
if fee == previous.get(from_currency, {}).get(to_currency, 0):
continue

if fee < fee_threshold:
if (
fee
< fee_threshold
< previous.get(from_currency, {}).get(to_currency, 0)
):
await notify_subscribers(
bot,
session,
Expand Down

0 comments on commit 6f1de83

Please sign in to comment.