@sonarwatch/portfolio-plugins 0.11.161 → 0.11.163
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,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.11.163](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.162...plugins-0.11.163) (2024-04-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.11.162](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.161...plugins-0.11.162) (2024-04-04)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [0.11.161](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.160...plugins-0.11.161) (2024-04-04)
|
|
6
14
|
|
|
7
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.163",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"generators": "./generators.json",
|
|
6
6
|
"dependencies": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"web3-v1": "npm:web3@^1.5.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@sonarwatch/portfolio-core": "0.11.
|
|
44
|
+
"@sonarwatch/portfolio-core": "0.11.163"
|
|
45
45
|
},
|
|
46
46
|
"main": "./src/index.js",
|
|
47
47
|
"types": "./src/index.d.ts"
|
|
@@ -19,7 +19,7 @@ const constants_1 = require("./constants");
|
|
|
19
19
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
|
20
20
|
const banxFactor = new bignumber_js_1.default(Math.pow(10, constants_1.banxDecimals));
|
|
21
21
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
-
// Account fetch was taking up to 1 min so better to use their API.
|
|
22
|
+
// Account fetch was taking up to 1 min so better to use their API for now.
|
|
23
23
|
// const client = getClientSolana();
|
|
24
24
|
// const accounts = await getParsedProgramAccounts(
|
|
25
25
|
// client,
|
|
@@ -39,12 +39,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
|
39
39
|
.catch(() => null);
|
|
40
40
|
if (!banxRes)
|
|
41
41
|
return [];
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const amount = new bignumber_js_1.default(banxRes.data.data.banxTokenStake.tokensStaked).dividedBy(banxFactor);
|
|
43
|
+
if (amount.isZero())
|
|
44
|
+
return [];
|
|
45
45
|
const tokenPrice = yield cache.getTokenPrice(constants_1.banxMint, portfolio_core_1.NetworkId.solana);
|
|
46
|
-
const assets = [
|
|
47
|
-
|
|
46
|
+
const assets = [
|
|
47
|
+
(0, tokenPriceToAssetToken_1.default)(constants_1.banxMint, amount.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice),
|
|
48
|
+
];
|
|
48
49
|
return [
|
|
49
50
|
{
|
|
50
51
|
type: portfolio_core_1.PortfolioElementType.multiple,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AACrC,kDAA6C;AAG7C,2CAA6E;AAC7E,qGAA6E;AAG7E,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,wBAAY,CAAA,CAAC,CAAC;AAErD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/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AS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
|
@@ -10,10 +10,16 @@ const limitFetcher_1 = __importDefault(require("./exchange/limitFetcher"));
|
|
|
10
10
|
const dcaFetcher_1 = __importDefault(require("./exchange/dcaFetcher"));
|
|
11
11
|
const custodiesJob_1 = __importDefault(require("./exchange/custodiesJob"));
|
|
12
12
|
const allocationsFetcher_1 = __importDefault(require("./launchpad/allocationsFetcher"));
|
|
13
|
+
const constants_1 = require("./launchpad/constants");
|
|
13
14
|
const voteFetcher_1 = __importDefault(require("./governance/voteFetcher"));
|
|
15
|
+
const constants_2 = require("./governance/constants");
|
|
14
16
|
const pricingJob_1 = __importDefault(require("./pricingJob"));
|
|
15
|
-
const
|
|
16
|
-
exports.platforms = [
|
|
17
|
+
const constants_3 = require("./exchange/constants");
|
|
18
|
+
exports.platforms = [
|
|
19
|
+
constants_3.jupiterPlatform,
|
|
20
|
+
constants_2.jupGovernancePlatform,
|
|
21
|
+
constants_1.jupLaunchpadPlatform,
|
|
22
|
+
];
|
|
17
23
|
exports.jobs = [custodiesJob_1.default, pricingJob_1.default];
|
|
18
24
|
exports.fetchers = [
|
|
19
25
|
perpetualFetcher_1.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/index.ts"],"names":[],"mappings":";;;;;;AAGA,mFAA2D;AAC3D,yFAAiE;AACjE,2EAAmD;AACnD,uEAA+C;AAC/C,2EAAmD;AAEnD,wFAA+D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/index.ts"],"names":[],"mappings":";;;;;;AAGA,mFAA2D;AAC3D,yFAAiE;AACjE,2EAAmD;AACnD,uEAA+C;AAC/C,2EAAmD;AAEnD,wFAA+D;AAC/D,qDAA6D;AAE7D,2EAAmD;AACnD,sDAA+D;AAE/D,8DAAsC;AACtC,oDAAuD;AAE1C,QAAA,SAAS,GAAe;IACnC,2BAAe;IACf,iCAAqB;IACrB,gCAAoB;CACrB,CAAC;AACW,QAAA,IAAI,GAAU,CAAC,sBAAY,EAAE,oBAAU,CAAC,CAAC;AACzC,QAAA,QAAQ,GAAc;IACjC,0BAAgB;IAChB,6BAAmB;IACnB,sBAAY;IACZ,oBAAU;IACV,4BAAiB;IACjB,qBAAW;CACZ,CAAC"}
|