@typus/typus-sdk 1.0.45 → 1.0.47
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.
|
@@ -55,14 +55,39 @@ var depositorRequestData = {
|
|
|
55
55
|
query: "depositTvl",
|
|
56
56
|
alias: "",
|
|
57
57
|
id: "a",
|
|
58
|
-
labelSelector: {
|
|
59
|
-
// user: "0x823bd0c4d601d625b1b1555dbe17da495db71070a4365205467838aecc32cbad",
|
|
60
|
-
},
|
|
58
|
+
labelSelector: {},
|
|
61
59
|
aggregate: {
|
|
62
60
|
op: "SUM",
|
|
63
|
-
grouping: ["user"],
|
|
61
|
+
grouping: ["user", "coin_symbol"],
|
|
64
62
|
},
|
|
63
|
+
functions: [],
|
|
64
|
+
disabled: true,
|
|
65
|
+
},
|
|
66
|
+
dataSource: "METRICS",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
priceQuery: {
|
|
70
|
+
id: "b",
|
|
71
|
+
alias: "",
|
|
72
|
+
coinId: [
|
|
73
|
+
{
|
|
74
|
+
symbol: "SUI",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
symbol: "USDC",
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
disabled: true,
|
|
65
81
|
},
|
|
82
|
+
dataSource: "PRICE",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
formulas: [
|
|
86
|
+
{
|
|
87
|
+
expression: "a*b",
|
|
88
|
+
alias: "{{user}}",
|
|
89
|
+
id: "A",
|
|
90
|
+
disabled: false,
|
|
66
91
|
},
|
|
67
92
|
],
|
|
68
93
|
};
|
|
@@ -99,7 +124,7 @@ function getDepositorLeaderBoard(start, end, step) {
|
|
|
99
124
|
.map(function (element) {
|
|
100
125
|
// console.log("metric:", element.metric, "values: ", element.values);
|
|
101
126
|
// console.log("user:", element.metric.labels.user, "score: ", element.values.at(-1).value);
|
|
102
|
-
var sum = element.values.reduce(function (acc, curr) { return acc + curr.value /
|
|
127
|
+
var sum = element.values.reduce(function (acc, curr) { return acc + curr.value / len_1; }, 0);
|
|
103
128
|
return {
|
|
104
129
|
user: element.metric.labels.user,
|
|
105
130
|
score: sum,
|
|
@@ -45,7 +45,9 @@ function getPortfolioVaults(provider, registry, token_deposit_vault_registry, us
|
|
|
45
45
|
var portfolioVaultIds, portfolioVaults, tokenDepositVaultIds, usdDepositVaultIds, bidVaultIds;
|
|
46
46
|
return __generator(this, function (_a) {
|
|
47
47
|
switch (_a.label) {
|
|
48
|
-
case 0:
|
|
48
|
+
case 0:
|
|
49
|
+
console.warn = function () { };
|
|
50
|
+
return [4 /*yield*/, provider.getDynamicFields({ parentId: registry })];
|
|
49
51
|
case 1:
|
|
50
52
|
portfolioVaultIds = (_a.sent()).data
|
|
51
53
|
.filter(function (x) { return (index ? x.name.value == index : true); })
|
|
@@ -46,7 +46,9 @@ function getPortfolioVaults(provider, registry, deposit_vault_registry, bid_vaul
|
|
|
46
46
|
var _this = this;
|
|
47
47
|
return __generator(this, function (_a) {
|
|
48
48
|
switch (_a.label) {
|
|
49
|
-
case 0:
|
|
49
|
+
case 0:
|
|
50
|
+
console.warn = function () { };
|
|
51
|
+
return [4 /*yield*/, provider.getDynamicFields({ parentId: registry })];
|
|
50
52
|
case 1:
|
|
51
53
|
portfolioVaultIds = (_a.sent()).data
|
|
52
54
|
.filter(function (x) { return (index ? x.name.value == index : true); })
|