@tradeport/sui-trading-sdk 0.4.47 → 0.4.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/calculateRoyaltyFee.ts +4 -1
package/dist/index.js
CHANGED
|
@@ -3483,7 +3483,7 @@ function calculateRoyaltyFee(transferPolicyRules, price) {
|
|
|
3483
3483
|
if (!royaltyRule || !royaltyRule.amount_bp && !royaltyRule.min_amount) {
|
|
3484
3484
|
return ZERO;
|
|
3485
3485
|
}
|
|
3486
|
-
const royaltyFee = royaltyRule.amount_bp ? new bigNumberConfig_default(royaltyRule.amount_bp).times(price).div(1e4) : ZERO;
|
|
3486
|
+
const royaltyFee = royaltyRule.amount_bp ? new bigNumberConfig_default(royaltyRule.amount_bp).times(price).div(1e4).integerValue(bigNumberConfig_default.ROUND_DOWN) : ZERO;
|
|
3487
3487
|
if (royaltyRule.min_amount && new bigNumberConfig_default(royaltyRule.min_amount).isGreaterThan(royaltyFee)) {
|
|
3488
3488
|
return new bigNumberConfig_default(royaltyRule.min_amount);
|
|
3489
3489
|
}
|