Skip to content

Commit f0bdf01

Browse files
authored
fix test to return a random bigint within the range (#420)
1 parent b67bcda commit f0bdf01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HavenoClient.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4582,7 +4582,7 @@ function multiply(amount: bigint, multiplier: number): bigint {
45824582
}
45834583

45844584
function getRandomBigIntWithinRange(min: bigint, max: bigint): bigint {
4585-
return BigInt(Math.floor(Math.random() * (Number(max) - Number(min))) + Number(min));
4585+
return min + BigInt(Math.floor(Math.random() * Number(max - min + 1n)));
45864586
}
45874587

45884588
function getRandomAssetCode() {

0 commit comments

Comments
 (0)