@typus/typus-sdk 1.4.62 → 1.4.63

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.
@@ -15,7 +15,7 @@ export interface TxHistory {
15
15
  Date: Date;
16
16
  txDigest: string;
17
17
  }
18
- export declare function parseTxHistory(datas: Array<any>, originPackageId: string, vaults: {
18
+ export declare function parseTxHistory(datas: Array<any>, vaults: {
19
19
  [key: string]: Vault;
20
20
  }): Promise<Array<TxHistory>>;
21
21
  export declare function parseVaultInfo(vaults: {
@@ -145,7 +145,7 @@ function getAutoBidEvents(provider, originPackage, startTimeMs) {
145
145
  });
146
146
  });
147
147
  }
148
- function parseTxHistory(datas, originPackageId, vaults) {
148
+ function parseTxHistory(datas, vaults) {
149
149
  return __awaiter(this, void 0, void 0, function () {
150
150
  var results;
151
151
  var _this = this;
@@ -154,8 +154,8 @@ function parseTxHistory(datas, originPackageId, vaults) {
154
154
  case 0: return [4 /*yield*/, datas
155
155
  .filter(function (event) {
156
156
  var type = event.type;
157
- return (event.packageId == originPackageId ||
158
- type.includes(originPackageId) ||
157
+ return (event.module == "tds_user_entry" ||
158
+ type.includes("typus_dov_single") ||
159
159
  type.includes("typus_nft::First") ||
160
160
  type.includes("typus_nft::ExpUpEvent") ||
161
161
  type.includes("tails_staking"));
@@ -10,7 +10,7 @@ export interface TxHistory {
10
10
  txDigest: string;
11
11
  log: string[];
12
12
  }
13
- export declare function parseTxHistory(datas: Array<any>, originPackage: string): Promise<Array<TxHistory>>;
13
+ export declare function parseTxHistory(datas: Array<any>): Promise<Array<TxHistory>>;
14
14
  export declare function getDepositorCashFlows(userHistory: TxHistory[]): Map<string, DepositorCashFlow>;
15
15
  export interface DepositorCashFlow {
16
16
  D_TOKEN: string | undefined;
@@ -100,8 +100,7 @@ function getUserEvents(provider, sender, cursor) {
100
100
  });
101
101
  });
102
102
  }
103
- function parseTxHistory(datas, originPackage // safu package
104
- ) {
103
+ function parseTxHistory(datas) {
105
104
  return __awaiter(this, void 0, void 0, function () {
106
105
  var results;
107
106
  var _this = this;
@@ -109,7 +108,7 @@ function parseTxHistory(datas, originPackage // safu package
109
108
  switch (_a.label) {
110
109
  case 0: return [4 /*yield*/, datas
111
110
  .filter(function (event) {
112
- return event.packageId == originPackage || event.type.includes(originPackage);
111
+ return event.type.includes("safu");
113
112
  })
114
113
  .sort(function (a, b) {
115
114
  // From Old to New!
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.4.62",
5
+ "version": "1.4.63",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",