Skip to content

Commit 0772837

Browse files
committed
do not send voting alert if offer in saved offers
1 parent de3a3dd commit 0772837

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/alert_bot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,9 @@ def check_voting(self):
438438
return
439439
need_to_vote = []
440440
offers = self.ton.GetOffers()
441+
saved_offers = self.ton.GetSaveOffers()
441442
for offer in offers:
442-
if not offer['isPassed'] and offer['approvedPercent'] >= 50 and validator_index not in offer['votedValidators']:
443+
if not offer['isPassed'] and offer['approvedPercent'] >= 50 and validator_index not in offer['votedValidators'] and offer['hash'] not in saved_offers:
443444
need_to_vote.append(offer['hash'])
444445
if need_to_vote:
445446
self.send_alert("voting", hashes=' '.join(need_to_vote))

0 commit comments

Comments
 (0)