@typus/typus-sdk 1.0.91 → 1.0.93
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/utils/typus-nft/fetch.js +18 -23
- package/package.json +1 -1
|
@@ -63,7 +63,7 @@ function getPool(provider, pool) {
|
|
|
63
63
|
pool_id: pool,
|
|
64
64
|
is_live: fields.is_live,
|
|
65
65
|
num: Number(fields.num),
|
|
66
|
-
remaining: fields.tails.
|
|
66
|
+
remaining: Number(fields.tails.fields.contents.fields.size),
|
|
67
67
|
};
|
|
68
68
|
return [2 /*return*/, poolData];
|
|
69
69
|
}
|
|
@@ -86,6 +86,7 @@ exports.necklaces = [
|
|
|
86
86
|
"sui_network",
|
|
87
87
|
"blockvision",
|
|
88
88
|
"team",
|
|
89
|
+
"nft_vault",
|
|
89
90
|
];
|
|
90
91
|
function getPoolMap(provider, nftConfig) {
|
|
91
92
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -98,28 +99,22 @@ function getPoolMap(provider, nftConfig) {
|
|
|
98
99
|
return [4 /*yield*/, provider.multiGetObjects({ ids: pools, options: { showContent: true } })];
|
|
99
100
|
case 1:
|
|
100
101
|
res = _a.sent();
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return [2 /*return*/, map];
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}); }, Promise.resolve(new Map()))];
|
|
121
|
-
case 2:
|
|
122
|
-
poolMap = _a.sent();
|
|
102
|
+
poolMap = new Map();
|
|
103
|
+
exports.necklaces.forEach(function (necklace, i) { return __awaiter(_this, void 0, void 0, function () {
|
|
104
|
+
var fields, poolData;
|
|
105
|
+
var _a;
|
|
106
|
+
return __generator(this, function (_b) {
|
|
107
|
+
fields = (_a = res[i].data) === null || _a === void 0 ? void 0 : _a.content.fields;
|
|
108
|
+
poolData = {
|
|
109
|
+
pool_id: pools[i],
|
|
110
|
+
is_live: fields.is_live,
|
|
111
|
+
num: Number(fields.num),
|
|
112
|
+
remaining: Number(fields.tails.fields.contents.fields.size),
|
|
113
|
+
};
|
|
114
|
+
poolMap.set(necklace, poolData);
|
|
115
|
+
return [2 /*return*/];
|
|
116
|
+
});
|
|
117
|
+
}); });
|
|
123
118
|
return [2 /*return*/, poolMap];
|
|
124
119
|
}
|
|
125
120
|
});
|