@typus/typus-sdk 1.1.22 → 1.1.23
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.
|
@@ -3,9 +3,10 @@ import { Vault } from "./view-function";
|
|
|
3
3
|
export declare function getUserHistory(provider: JsonRpcProvider, originPackage: string, vaults: {
|
|
4
4
|
[key: string]: Vault;
|
|
5
5
|
}, sender: string, startTimeMs: number): Promise<TxHistory[]>;
|
|
6
|
-
interface TxHistory {
|
|
6
|
+
export interface TxHistory {
|
|
7
7
|
Index: string;
|
|
8
8
|
Action: string;
|
|
9
|
+
Period: string | undefined;
|
|
9
10
|
Amount: string | undefined;
|
|
10
11
|
Vault: string | undefined;
|
|
11
12
|
RiskLevel: string | undefined;
|
|
@@ -14,4 +15,3 @@ interface TxHistory {
|
|
|
14
15
|
Date: Date;
|
|
15
16
|
txDigest: string;
|
|
16
17
|
}
|
|
17
|
-
export {};
|
|
@@ -89,7 +89,7 @@ function parseTxHistory(datas, originPackage, vaults) {
|
|
|
89
89
|
return type.startsWith(originPackage) || type.includes("typus_nft::First") || type.includes("typus_nft::ExpUpEvent");
|
|
90
90
|
})
|
|
91
91
|
.reduce(function (promise, event) { return __awaiter(_this, void 0, void 0, function () {
|
|
92
|
-
var txHistory, functionType, action, Action, Amount, Vault, RiskLevel, Tails, Exp, o_token, v, period, optionType, i, i, token, amount, amount, token, amount, size, token, amount, i, b_token, size, bidder_balance;
|
|
92
|
+
var txHistory, functionType, action, Action, Amount, Period, Vault, RiskLevel, Tails, Exp, o_token, v, period, optionType, i, i, token, amount, amount, token, amount, size, token, amount, i, b_token, size, bidder_balance;
|
|
93
93
|
var _a, _b;
|
|
94
94
|
return __generator(this, function (_c) {
|
|
95
95
|
switch (_c.label) {
|
|
@@ -122,6 +122,7 @@ function parseTxHistory(datas, originPackage, vaults) {
|
|
|
122
122
|
period = "";
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
|
+
Period = period;
|
|
125
126
|
optionType = void 0;
|
|
126
127
|
switch (v.info.optionType) {
|
|
127
128
|
case "0":
|
|
@@ -293,6 +294,7 @@ function parseTxHistory(datas, originPackage, vaults) {
|
|
|
293
294
|
}
|
|
294
295
|
txHistory.push({
|
|
295
296
|
Index: (_b = vaults[event.parsedJson.index]) === null || _b === void 0 ? void 0 : _b.info.index,
|
|
297
|
+
Period: Period,
|
|
296
298
|
Action: Action,
|
|
297
299
|
Amount: Amount,
|
|
298
300
|
Vault: Vault,
|