@sonarwatch/portfolio-plugins 0.14.69 → 0.14.70
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/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.14.70](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.69...plugins-0.14.70) (2024-12-17)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.14.69](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.68...plugins-0.14.69) (2024-12-17)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
@@ -14,29 +14,26 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
14
14
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
15
15
|
const constants_1 = require("./constants");
|
16
16
|
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
});
|
37
|
-
}
|
17
|
+
const res = yield fetch(`${constants_1.airdropApi + owner}?`);
|
18
|
+
const response = yield res.json();
|
19
|
+
const items = response.categories
|
20
|
+
.map((category) => category.items.filter((i) => i.address === owner))
|
21
|
+
.flat();
|
22
|
+
if (items.length) {
|
23
|
+
const amount = items.reduce((previousValue, item) => Number((item === null || item === void 0 ? void 0 : item.amount) || 0) + previousValue, 0);
|
24
|
+
const isClaimed = response.totalUnclaimed < amount;
|
25
|
+
return (0, AirdropFetcher_1.getAirdropRaw)({
|
26
|
+
statics: constants_1.airdropStatics,
|
27
|
+
items: [
|
28
|
+
{
|
29
|
+
amount,
|
30
|
+
isClaimed,
|
31
|
+
label: 'PENGU',
|
32
|
+
address: constants_1.pudgyMint,
|
33
|
+
},
|
34
|
+
],
|
35
|
+
});
|
38
36
|
}
|
39
|
-
catch (err) { }
|
40
37
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
41
38
|
statics: constants_1.airdropStatics,
|
42
39
|
items: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pudgypenguins/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AACvD,yDAK8B;AAE9B,2CAA8E;AAG9E,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pudgypenguins/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AACvD,yDAK8B;AAE9B,2CAA8E;AAG9E,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,sBAAU,GAAG,KAAK,GAAG,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAoB,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAEnD,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU;SAC9B,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC;SACpE,IAAI,EAAE,CAAC;IAEV,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CACzB,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAA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