@dhedge/v2-sdk 1.7.1 → 1.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/v2-sdk",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "license": "MIT",
5
5
  "description": "🛠 An SDK for building applications on top of dHEDGE V2",
6
6
  "main": "dist/index.js",
@@ -63,13 +63,7 @@ export async function getLyraOptionTxData(
63
63
  txFunction = "closePosition";
64
64
  setCollateral = currentCollateral.sub(collateralAmount);
65
65
  //cover short
66
- if (
67
- !isLong(filteredPosition[0].optionType) &&
68
- !isCoveredCall &&
69
- collateralAmount.gt(netPremiun)
70
- ) {
71
- inputAmount = netPremiun.sub(collateralAmount);
72
- } else if (!isLong(filteredPosition[0].optionType) && isCoveredCall) {
66
+ if (!isLong(filteredPosition[0].optionType) && isCoveredCall) {
73
67
  inputAmount = netPremiun;
74
68
  } else {
75
69
  inputAmount = BigNumber.from(0);