Skip to content

Commit

Permalink
index last winner update
Browse files Browse the repository at this point in the history
  • Loading branch information
alyn509 committed Sep 25, 2024
1 parent f6e2f8e commit 0232fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/examples/lottery-esdt/src/lottery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ pub trait Lottery {
if index_last_winner < total_winning_tickets {
let prize = self.calculate_percentage_of(
&info.prize_pool,
&BigUint::from(info.prize_distribution.get(1)),
&BigUint::from(info.prize_distribution.get(index_last_winner)),
);
if prize > 0 {
self.assign_prize_to_winner(
Expand Down

0 comments on commit 0232fda

Please sign in to comment.