@typus/typus-perp-sdk 1.1.32-codegen-exp36 → 1.1.32-codegen-exp37

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.
@@ -570,7 +570,6 @@ async function getCancelOrderFromSentio(userAddress, startTimestamp, events) {
570
570
  }
571
571
  async function getOrderMatchFromSentio(userAddress, startTimestamp, events) {
572
572
  const datas = await (0, sentio_1.getFromSentio)("OrderFilled", userAddress, startTimestamp.toString(), true);
573
- // console.log(datas);
574
573
  let order_match = datas.map((x) => {
575
574
  let base_token = toToken(x.base_token);
576
575
  let txHistory = {
@@ -578,7 +577,7 @@ async function getOrderMatchFromSentio(userAddress, startTimestamp, events) {
578
577
  ? "Order Filled (Open Position)"
579
578
  : x.sender == "0x978f65df8570a075298598a9965c18de9087f9e888eb3430fe20334f5c554cfd"
580
579
  ? "Force Close Position"
581
- : x.order_type == "Increase" ? "Order Filled (Increase Position)" : "Order Filled (Close Position)",
580
+ : "Order Filled (Close Position)",
582
581
  typeName: "OrderFilledEvent",
583
582
  order_id: x.order_id,
584
583
  position_id: x.position_id,
@@ -609,6 +608,12 @@ async function getOrderMatchFromSentio(userAddress, startTimestamp, events) {
609
608
  x.order_type = related.order_type;
610
609
  x.collateral = related.collateral;
611
610
  x.dov_index = related.dov_index;
611
+ // it mean filled by matching cranker
612
+ if (x.action === "Order Filled (Close Position)") {
613
+ if (x.side === related.side) {
614
+ x.action = "Order Filled (Increase Position)";
615
+ }
616
+ }
612
617
  }
613
618
  else {
614
619
  x.order_type = "Market";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.1.32-codegen-exp36",
3
+ "version": "1.1.32-codegen-exp37",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",