From d12f6215398783d21529d96e95ae47341b98e8e6 Mon Sep 17 00:00:00 2001 From: Austin Kline Date: Fri, 15 Dec 2023 06:59:09 -0800 Subject: [PATCH] fix draw --- contracts/Raffles.cdc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/Raffles.cdc b/contracts/Raffles.cdc index 39183e4..d47cce3 100644 --- a/contracts/Raffles.cdc +++ b/contracts/Raffles.cdc @@ -78,7 +78,7 @@ pub contract Raffles { pub fun draw(): Int { let r = revertibleRandom() - return Int(UInt64(self.addresses.length) % r) + return Int(r % UInt64(self.addresses.length)) } pub fun getEntryAt(index: Int): AnyStruct {