@magmaprotocol/magma-clmm-sdk 0.5.1 → 0.5.3
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 +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2765,12 +2765,12 @@ var _TransactionUtil = class {
|
|
|
2765
2765
|
max_amount_a = params.amount_a;
|
|
2766
2766
|
min_amount_a = params.amount_a;
|
|
2767
2767
|
max_amount_b = params.amount_b;
|
|
2768
|
-
min_amount_b = new Decimal4(params.amount_b).div(new Decimal4(1).plus(new Decimal4(params.slippage))).mul(new Decimal4(1).minus(new Decimal4(params.slippage))).toNumber();
|
|
2768
|
+
min_amount_b = new Decimal4(params.amount_b).div(new Decimal4(1).plus(new Decimal4(params.slippage))).mul(new Decimal4(1).minus(new Decimal4(params.slippage))).toDecimalPlaces(0).toNumber();
|
|
2769
2769
|
} else {
|
|
2770
2770
|
max_amount_b = params.amount_b;
|
|
2771
2771
|
min_amount_b = params.amount_b;
|
|
2772
2772
|
max_amount_a = params.amount_a;
|
|
2773
|
-
min_amount_a = new Decimal4(params.amount_a).div(new Decimal4(1).plus(new Decimal4(params.slippage))).mul(new Decimal4(1).minus(new Decimal4(params.slippage))).toNumber();
|
|
2773
|
+
min_amount_a = new Decimal4(params.amount_a).div(new Decimal4(1).plus(new Decimal4(params.slippage))).mul(new Decimal4(1).minus(new Decimal4(params.slippage))).toDecimalPlaces(0).toNumber();
|
|
2774
2774
|
}
|
|
2775
2775
|
const args = params.is_open ? [
|
|
2776
2776
|
tx.object(clmmConfig.global_config_id),
|
|
@@ -2796,7 +2796,6 @@ var _TransactionUtil = class {
|
|
|
2796
2796
|
tx.pure.u64(min_amount_a),
|
|
2797
2797
|
tx.pure.u64(min_amount_b),
|
|
2798
2798
|
tx.pure.bool(params.fix_amount_a),
|
|
2799
|
-
tx.object(CLOCK_ADDRESS),
|
|
2800
2799
|
tx.object(CLOCK_ADDRESS)
|
|
2801
2800
|
];
|
|
2802
2801
|
tx.moveCall({
|