Skip to content

Commit

Permalink
Prizetap: refactor get_last_winner_index
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayanShiravani committed Nov 12, 2023
1 parent b498f06 commit 480b549
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions prizetap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def get_raffle(self):

def get_last_winner_index(self):
raffle = self.get_raffle()
last_index = raffle[8] if not self.raffle.is_prize_nft else raffle[7]
return last_index
return raffle["lastWinnerIndex"]

def set_winners(self):
winners_count = self.raffle.winners_count
Expand Down

0 comments on commit 480b549

Please sign in to comment.