@typus/typus-perp-sdk 1.0.27 → 1.0.28

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.
@@ -131,7 +131,7 @@ function parseUserHistory(raw_events) {
131
131
  base_token: base_token,
132
132
  collateral: collateral,
133
133
  collateral_token: collateral_token,
134
- price: Number(price) / Math.pow(10, (0, constants_1.assetToDecimal)("USD")), // WARNING: fixed decimal
134
+ price: Number(price) / Math.pow(10, 8), // WARNING: fixed decimal
135
135
  realized_pnl: undefined,
136
136
  timestamp: timestamp,
137
137
  tx_digest: tx_digest,
@@ -266,7 +266,7 @@ function parseUserHistory(raw_events) {
266
266
  collateral: Number(json.from_amount) / Math.pow(10, (0, constants_1.assetToDecimal)(from_token)),
267
267
  collateral_token: from_token,
268
268
  price: from_price / to_price,
269
- realized_pnl: -Number(json.fee_amount_usd) / Math.pow(10, 6),
269
+ realized_pnl: -Number(json.fee_amount_usd) / Math.pow(10, 9),
270
270
  timestamp: timestamp,
271
271
  tx_digest: tx_digest,
272
272
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",