@typus/typus-perp-sdk 1.0.40-fix-history-6 → 1.0.40-fix-history-7

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.
@@ -119,16 +119,13 @@ function parseUserHistory(raw_events) {
119
119
  else if (json.reduce_only && json.is_stop_order) {
120
120
  order_type = "Stop Loss";
121
121
  }
122
- if (json.linked_position_id != undefined) {
123
- related = events.find(function (e) { return e.position_id == json.linked_position_id && e.market == market; });
124
- }
125
122
  var e = {
126
123
  action: "Place Order",
127
124
  typeName: name,
128
125
  order_id: json.order_id,
129
126
  position_id: json.linked_position_id,
130
127
  market: market,
131
- side: related ? related.side : json.is_long ? "Long" : "Short",
128
+ side: json.is_long ? "Long" : "Short",
132
129
  order_type: order_type,
133
130
  status: json.filled ? "Filled" : "Open",
134
131
  size: size,
@@ -380,6 +377,9 @@ function getOrderMatchFromSentio(userAddress, startTimestamp, events) {
380
377
  datas = _a.sent();
381
378
  order_match = datas.map(function (x) {
382
379
  var base_token = toToken(x.trading_token);
380
+ if (x.transaction_hash == "ELpp2GkW6PRVCLbKqJNgRrNTch2py42rA6PG9JRJnnfm") {
381
+ console.log({ x: x });
382
+ }
383
383
  var txHistory = {
384
384
  action: x.order_type == "Open" ? "Order Filled (Open Position)" : "Order Filled (Close Position)",
385
385
  typeName: "OrderFilledEvent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.0.40-fix-history-6",
3
+ "version": "1.0.40-fix-history-7",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",