Skip to content

Conversation

@asselstine
Copy link

No description provided.

@linear
Copy link

linear bot commented Nov 30, 2021

POOL-1918 Make it easy to calculate more human prize tiers

People express prize tiers as:

2500,

800,

400

etc.

We need a lib to help with that

Comment on lines +19 to +23
(tot: BigNumber, tierPrize: BigNumber, index: number): BigNumber => {
return tot.add(
tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index))
);
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tot is the total right? Would be more explicit in full.

Suggested change
(tot: BigNumber, tierPrize: BigNumber, index: number): BigNumber => {
return tot.add(
tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index))
);
},
(total: BigNumber, tierPrize: BigNumber, index: number): BigNumber => {
return total.add(
tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index))
);
},

tierPrize.mul(calculateNumberOfPrizesForIndex(bitRangeSize, index))
);
},
ethers.BigNumber.from("0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed and this way we can also remove the ethers import.

Suggested change
ethers.BigNumber.from("0")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants