@typus/typus-sdk 1.6.22 → 1.6.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.
|
@@ -173,11 +173,11 @@ function parseTxHistory(datas) {
|
|
|
173
173
|
case "raise_fund":
|
|
174
174
|
// balance_value, deactivating_value, inactive_value,
|
|
175
175
|
// Number(log[2]) + Number(log[3]) + Number(log[4])
|
|
176
|
-
if (Number(log[2])
|
|
176
|
+
if (Number(log[2]) > 0) {
|
|
177
177
|
txHistory.push({
|
|
178
178
|
Action: "Deposit",
|
|
179
179
|
Index: log[0],
|
|
180
|
-
Amount: divByDecimal(Number(log[2])
|
|
180
|
+
Amount: divByDecimal(Number(log[2]), decimal),
|
|
181
181
|
Token: Token,
|
|
182
182
|
Exp: log[6],
|
|
183
183
|
Date: new Date(Number(event.timestampMs)),
|
|
@@ -197,6 +197,28 @@ function parseTxHistory(datas) {
|
|
|
197
197
|
log: log,
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
+
if (Number(log[4]) > 0) {
|
|
201
|
+
txHistory.push({
|
|
202
|
+
Action: "Withdraw",
|
|
203
|
+
Index: log[0],
|
|
204
|
+
Amount: divByDecimal(Number(log[4]), decimal),
|
|
205
|
+
Token: Token,
|
|
206
|
+
Exp: log[6],
|
|
207
|
+
Date: new Date(Number(event.timestampMs)),
|
|
208
|
+
txDigest: event.id.txDigest,
|
|
209
|
+
log: log,
|
|
210
|
+
});
|
|
211
|
+
txHistory.push({
|
|
212
|
+
Action: "Deposit",
|
|
213
|
+
Index: log[0],
|
|
214
|
+
Amount: divByDecimal(Number(log[4]), decimal),
|
|
215
|
+
Token: Token,
|
|
216
|
+
Exp: undefined,
|
|
217
|
+
Date: new Date(Number(event.timestampMs)),
|
|
218
|
+
txDigest: event.id.txDigest,
|
|
219
|
+
log: log,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
200
222
|
if (Number(log[5]) > 0) {
|
|
201
223
|
txHistory.push({
|
|
202
224
|
Action: "Compound",
|