@typus/typus-sdk 1.4.71 → 1.4.72
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.
|
@@ -108,7 +108,8 @@ function parseTxHistory(datas) {
|
|
|
108
108
|
switch (_a.label) {
|
|
109
109
|
case 0: return [4 /*yield*/, datas
|
|
110
110
|
.filter(function (event) {
|
|
111
|
-
return event.type.includes("safu")
|
|
111
|
+
return (event.type.includes("safu") ||
|
|
112
|
+
event.type == "0x7dab89563066afa000ee154738aac2cc8e7d3e26cd0b470183db63630ee9f965::funding_vault::RaiseFundEvent");
|
|
112
113
|
})
|
|
113
114
|
.sort(function (a, b) {
|
|
114
115
|
// From Old to New!
|
|
@@ -120,12 +121,27 @@ function parseTxHistory(datas) {
|
|
|
120
121
|
}
|
|
121
122
|
})
|
|
122
123
|
.reduce(function (promise, event) { return __awaiter(_this, void 0, void 0, function () {
|
|
123
|
-
var txHistory, action, log, reader, Token, asset, decimal;
|
|
124
|
+
var txHistory, log_1, action, log, reader, Token, asset, decimal;
|
|
124
125
|
return __generator(this, function (_a) {
|
|
125
126
|
switch (_a.label) {
|
|
126
127
|
case 0: return [4 /*yield*/, promise];
|
|
127
128
|
case 1:
|
|
128
129
|
txHistory = _a.sent();
|
|
130
|
+
// console.log(event);
|
|
131
|
+
if (event.type == "0x7dab89563066afa000ee154738aac2cc8e7d3e26cd0b470183db63630ee9f965::funding_vault::RaiseFundEvent") {
|
|
132
|
+
log_1 = event.parsedJson.log;
|
|
133
|
+
txHistory.push({
|
|
134
|
+
Action: "Deposit",
|
|
135
|
+
Index: "deepbook/0",
|
|
136
|
+
Amount: divByDecimal(Number(log_1[0]), 9),
|
|
137
|
+
Token: event.parsedJson.token.name,
|
|
138
|
+
Exp: undefined,
|
|
139
|
+
Date: new Date(Number(event.timestampMs)),
|
|
140
|
+
txDigest: event.id.txDigest,
|
|
141
|
+
log: log_1,
|
|
142
|
+
});
|
|
143
|
+
return [2 /*return*/, txHistory];
|
|
144
|
+
}
|
|
129
145
|
action = event.parsedJson.action;
|
|
130
146
|
log = event.parsedJson.log;
|
|
131
147
|
// skip the event without tokenType
|