@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.
- package/dist/src/user/history.js +2 -2
- package/package.json +1 -1
package/dist/src/user/history.js
CHANGED
|
@@ -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,
|
|
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,
|
|
269
|
+
realized_pnl: -Number(json.fee_amount_usd) / Math.pow(10, 9),
|
|
270
270
|
timestamp: timestamp,
|
|
271
271
|
tx_digest: tx_digest,
|
|
272
272
|
};
|