@typus/typus-sdk 0.6.0 → 0.6.1
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.
- package/lib/constants.js +1 -2
- package/lib/test/eventListener.js +6 -3
- package/package.json +1 -1
package/lib/constants.js
CHANGED
|
@@ -27,12 +27,11 @@ exports.TOKEN_DECIMAL = 9;
|
|
|
27
27
|
exports.DEFAULT_TYPE_ARGUMENT = "0x2::sui::SUI";
|
|
28
28
|
exports.FAKE_TOKEN_TYPE_ARGUMENT = "0x27b3674c685046f66cad1d5496d2967894fa5329::token::USDC";
|
|
29
29
|
exports.TEST_MNEMONIC = "plug grain matter asthma aware critic can lottery blouse uncover sauce speak";
|
|
30
|
-
exports.TOKEN_NAME = ["BTC", "ETH", "SUI", "USDC", "USDT"];
|
|
30
|
+
exports.TOKEN_NAME = ["BTC", "ETH", "SUI", "USDC", "USDT", "APT", "DOGE"];
|
|
31
31
|
exports.TOKEN_NAME_TO_MODULE = {
|
|
32
32
|
"BTC": "btc",
|
|
33
33
|
"ETH": "eth",
|
|
34
34
|
"SUI": "sui",
|
|
35
35
|
"USDC": "usdc",
|
|
36
|
-
// "USDT": "token_usdt",
|
|
37
36
|
};
|
|
38
37
|
exports.TESTNET_RPC_ENDPOINT = "https://fullnode.testnet.sui.io:443";
|
|
@@ -182,9 +182,6 @@ function getBidEventsCranker(type, renewSec, provider) {
|
|
|
182
182
|
period = (bidId.period == "0") ? "Daily " : (bidId.period == "1") ? "Weekly " : (bidId.period == "2") ? "Monthly " : "- ";
|
|
183
183
|
format_1 += period + bidId.bidFormat + " is bid with " + size + " " + bidId.bidFormat.split("-")[0] + "! \n";
|
|
184
184
|
}
|
|
185
|
-
else {
|
|
186
|
-
console.log("can't get bidId in getBidEventsCranker");
|
|
187
|
-
}
|
|
188
185
|
return [2 /*return*/];
|
|
189
186
|
});
|
|
190
187
|
}); });
|
|
@@ -224,6 +221,8 @@ function getNewAuctionEventsCranker(type, renewSec, provider) {
|
|
|
224
221
|
case 1:
|
|
225
222
|
events = _b.sent();
|
|
226
223
|
newRes = events.data;
|
|
224
|
+
console.log("new Res in getNewAuctionEventsCranker:");
|
|
225
|
+
console.log(newRes);
|
|
227
226
|
return [4 /*yield*/, twoObjArrAreSame(newRes, res)];
|
|
228
227
|
case 2:
|
|
229
228
|
if (!!(_b.sent())) return [3 /*break*/, 5];
|
|
@@ -303,6 +302,8 @@ function getEndAuctionEventsCranker(type, renewSec, provider) {
|
|
|
303
302
|
case 1:
|
|
304
303
|
events = _b.sent();
|
|
305
304
|
newRes = events.data;
|
|
305
|
+
console.log("new Res in getEndAuctionEventsCranker:");
|
|
306
|
+
console.log(newRes);
|
|
306
307
|
return [4 /*yield*/, twoObjArrAreSame(newRes, res)];
|
|
307
308
|
case 2:
|
|
308
309
|
if (!!(_b.sent())) return [3 /*break*/, 5];
|
|
@@ -313,11 +314,13 @@ function getEndAuctionEventsCranker(type, renewSec, provider) {
|
|
|
313
314
|
return [4 /*yield*/, generateBidId(vault_1)];
|
|
314
315
|
case 4:
|
|
315
316
|
newBidIds = _b.sent();
|
|
317
|
+
console.log("new bid ids before filter:");
|
|
316
318
|
console.log(newBidIds);
|
|
317
319
|
//compare newBidIds to bidIds
|
|
318
320
|
newBidIds = newBidIds.filter(function (e) {
|
|
319
321
|
return !bidIds.find(function (tmp) { return tmp.bidFormat == e.bidFormat; });
|
|
320
322
|
});
|
|
323
|
+
console.log("new bid ids after filter:");
|
|
321
324
|
console.log(newBidIds);
|
|
322
325
|
_loop_2 = function (asset) {
|
|
323
326
|
var targetBids = newBidIds.filter(function (bidId) {
|