@defisaver/automation-sdk 3.1.1-dev-4 → 3.1.1-dev-5

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.
@@ -652,7 +652,7 @@ function parseLiquityV2CloseOnPrice(position, parseData) {
652
652
  _position.strategyData.decoded.triggerData = triggerData;
653
653
  _position.strategyData.decoded.subData = subData;
654
654
  _position.positionId = (0, utils_1.getPositionId)(_position.chainId, _position.protocol.id, _position.owner, subData.troveId, subData.market);
655
- const { takeProfitType, stopLossType } = (0, utils_1.getStopLossAndTakeProfitTypeByCloseStrategyType)(subData.closeType);
655
+ const { takeProfitType, stopLossType } = (0, utils_1.getStopLossAndTakeProfitTypeByCloseStrategyType)(+subData.closeType);
656
656
  // User can have:
657
657
  // - Only TakeProfit
658
658
  // - Only StopLoss
@@ -626,7 +626,7 @@ function parseLiquityV2CloseOnPrice(position, parseData) {
626
626
  _position.strategyData.decoded.triggerData = triggerData;
627
627
  _position.strategyData.decoded.subData = subData;
628
628
  _position.positionId = getPositionId(_position.chainId, _position.protocol.id, _position.owner, subData.troveId, subData.market);
629
- const { takeProfitType, stopLossType } = getStopLossAndTakeProfitTypeByCloseStrategyType(subData.closeType);
629
+ const { takeProfitType, stopLossType } = getStopLossAndTakeProfitTypeByCloseStrategyType(+subData.closeType);
630
630
  // User can have:
631
631
  // - Only TakeProfit
632
632
  // - Only StopLoss
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/automation-sdk",
3
- "version": "3.1.1-dev-4",
3
+ "version": "3.1.1-dev-5",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -864,7 +864,7 @@ function parseLiquityV2CloseOnPrice(position: Position.Automated, parseData: Par
864
864
  _position.chainId, _position.protocol.id, _position.owner, subData.troveId, subData.market,
865
865
  );
866
866
 
867
- const { takeProfitType, stopLossType } = getStopLossAndTakeProfitTypeByCloseStrategyType(subData.closeType);
867
+ const { takeProfitType, stopLossType } = getStopLossAndTakeProfitTypeByCloseStrategyType(+subData.closeType);
868
868
 
869
869
  // User can have:
870
870
  // - Only TakeProfit