staratlasmeta / factory

Star Atlas Factory for constructing Transactions targeting Solana on-chain programs
https://www.npmjs.com/package/@staratlas/factory
Apache License 2.0
37 stars 15 forks source link

fix(marketplace): Bug where percision is lost on creating order #92

Closed staratlasjim closed 2 years ago

staratlasjim commented 2 years ago

Changes

fix(bug): The previous code inadvertently converted the number to an INT by doing new BN(uiPrice) before multiplying the uiPrice into the correct number of digits:

e.g. if uiPrice = 7.16 then new BN(uiPrice) would become 700000. Basically, we have to do the Number Multiplication before converting to BN

Checklist