@sonarwatch/portfolio-plugins 0.12.73 → 0.12.75
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.75](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.74...plugins-0.12.75) (2024-07-16)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.12.74](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.73...plugins-0.12.74) (2024-07-16)
|
10
|
+
|
11
|
+
|
12
|
+
|
5
13
|
## [0.12.73](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.72...plugins-0.12.73) (2024-07-16)
|
6
14
|
|
7
15
|
|
package/package.json
CHANGED
@@ -15,6 +15,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const axios_1 = __importDefault(require("axios"));
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const constants_1 = require("./constants");
|
18
|
+
const constants_2 = require("../tokens/constants");
|
19
|
+
const tokensToPrice = {
|
20
|
+
CLOUD: { mint: 'CLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu', decimals: 9 },
|
21
|
+
};
|
18
22
|
const minToTake = 200;
|
19
23
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
24
|
const lastCount = yield cache.getItem(constants_1.lastCountKey, {
|
@@ -36,6 +40,21 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
40
|
prefix: constants_1.platformId,
|
37
41
|
networkId: portfolio_core_1.NetworkId.solana,
|
38
42
|
});
|
43
|
+
for (const [symbol, value] of Object.entries(tokensToPrice)) {
|
44
|
+
const token = tokens.find((t) => t.symbol === symbol);
|
45
|
+
if (token) {
|
46
|
+
yield cache.setTokenPriceSource({
|
47
|
+
address: value.mint,
|
48
|
+
decimals: value.decimals,
|
49
|
+
weight: 0.001,
|
50
|
+
id: constants_1.platformId,
|
51
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
52
|
+
platformId: constants_2.walletTokensPlatform.id,
|
53
|
+
price: token.last_price,
|
54
|
+
timestamp: Date.now(),
|
55
|
+
});
|
56
|
+
}
|
57
|
+
}
|
39
58
|
}
|
40
59
|
});
|
41
60
|
const job = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/tokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAA6E;
|
1
|
+
{"version":3,"file":"tokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/tokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAA6E;AAE7E,mDAA2D;AAE3D,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,EAAE,IAAI,EAAE,8CAA8C,EAAE,QAAQ,EAAE,CAAC,EAAE;CAC7E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAS,wBAAY,EAAE;QAC1D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAyC,MAAM,eAAK;SAC7D,GAAG,CAAC,qBAAS,EAAE;QACd,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,IAAI,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;KAC3D,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAErB,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,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