@sonarwatch/portfolio-plugins 0.14.104 → 0.14.105
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.105](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.104...plugins-0.14.105) (2025-02-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
## [0.14.104](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.103...plugins-0.14.104) (2025-02-06)
|
|
6
10
|
|
|
7
11
|
|
package/package.json
CHANGED
|
@@ -21,15 +21,15 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
21
21
|
yield (0, sleep_1.default)(90000);
|
|
22
22
|
const res = yield axios_1.default.get(constants_1.coingeckoExchangeRatesUrl);
|
|
23
23
|
const { rates } = res.data;
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
24
|
+
const btcPriceUsd = rates['usd'].value;
|
|
25
|
+
if (!btcPriceUsd || btcPriceUsd <= 0)
|
|
26
26
|
return;
|
|
27
27
|
const pricedCurrencies = portfolio_core_1.fiatCurrencies.map((fiat) => {
|
|
28
28
|
const btcRate = rates[fiat.name.toLowerCase()].value;
|
|
29
29
|
if (!btcRate || btcRate <= 0) {
|
|
30
30
|
return fiat;
|
|
31
31
|
}
|
|
32
|
-
return Object.assign(Object.assign({}, fiat), {
|
|
32
|
+
return Object.assign(Object.assign({}, fiat), { rateToUsd: 1 / (btcPriceUsd / btcRate), rateToBtc: btcRate, priceUsd: btcPriceUsd / btcRate, priceBtc: 1 / btcRate });
|
|
33
33
|
});
|
|
34
34
|
yield cache.setItem(constants_2.pricedCurrenciesKey, pricedCurrencies, {
|
|
35
35
|
prefix: constants_2.pricedCurrenciesPrefix,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fiatJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/coingecko/fiatJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+DAA4E;AAG5E,+DAA4E;AAE5E,2CAA0E;AAC1E,mEAA2C;AAE3C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,IAAA,eAAK,EAAC,KAAK,CAAC,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CACzB,qCAAyB,CAC1B,CAAC;IAEF,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;IAC3B,MAAM,
|
|
1
|
+
{"version":3,"file":"fiatJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/coingecko/fiatJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+DAA4E;AAG5E,+DAA4E;AAE5E,2CAA0E;AAC1E,mEAA2C;AAE3C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,IAAA,eAAK,EAAC,KAAK,CAAC,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CACzB,qCAAyB,CAC1B,CAAC;IAEF,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;IAC3B,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;IACvC,IAAI,CAAC,WAAW,IAAI,WAAW,IAAI,CAAC;QAAE,OAAO;IAE7C,MAAM,gBAAgB,GAAqB,+BAAc,CAAC,GAAG,CAC3D,CAAC,IAAI,EAAkB,EAAE;QACvB,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC;QACrD,IAAI,CAAC,OAAO,IAAI,O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