@sonarwatch/portfolio-plugins 0.12.35 → 0.12.37
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -2
- package/package.json +1 -1
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/orphanPlatorms.js +0 -8
- package/src/orphanPlatorms.js.map +1 -1
- package/src/plugins/01/depostisFetcher.js +1 -1
- package/src/plugins/01/depostisFetcher.js.map +1 -1
- package/src/plugins/aave/helpers.js +6 -1
- package/src/plugins/aave/helpers.js.map +1 -1
- package/src/plugins/allbridge/constants.d.ts +11 -0
- package/src/plugins/allbridge/constants.js +25 -0
- package/src/plugins/allbridge/constants.js.map +1 -0
- package/src/plugins/allbridge/helpers.d.ts +5 -0
- package/src/plugins/allbridge/helpers.js +25 -0
- package/src/plugins/allbridge/helpers.js.map +1 -0
- package/src/plugins/allbridge/idl.d.ts +58 -0
- package/src/plugins/allbridge/idl.js +476 -0
- package/src/plugins/allbridge/idl.js.map +1 -0
- package/src/plugins/allbridge/index.d.ts +6 -0
- package/src/plugins/allbridge/index.js +13 -0
- package/src/plugins/allbridge/index.js.map +1 -0
- package/src/plugins/allbridge/poolsJob.d.ts +3 -0
- package/src/plugins/allbridge/poolsJob.js +40 -0
- package/src/plugins/allbridge/poolsJob.js.map +1 -0
- package/src/plugins/allbridge/positionsFetcher.js +92 -0
- package/src/plugins/allbridge/positionsFetcher.js.map +1 -0
- package/src/plugins/allbridge/types.d.ts +38 -0
- package/src/plugins/allbridge/types.js +3 -0
- package/src/plugins/allbridge/types.js.map +1 -0
- package/src/plugins/aptin/depositsFetcher.js +6 -1
- package/src/plugins/aptin/depositsFetcher.js.map +1 -1
- package/src/plugins/aries/depositsFetcher.js +7 -1
- package/src/plugins/aries/depositsFetcher.js.map +1 -1
- package/src/plugins/banx/constants.d.ts +0 -1
- package/src/plugins/banx/constants.js +1 -2
- package/src/plugins/banx/constants.js.map +1 -1
- package/src/plugins/banx/{calculateLoanRepayValue.d.ts → helpers.d.ts} +1 -0
- package/src/plugins/banx/{calculateLoanRepayValue.js → helpers.js} +29 -2
- package/src/plugins/banx/helpers.js.map +1 -0
- package/src/plugins/banx/idl.d.ts +15 -7
- package/src/plugins/banx/idl.js +199 -268
- package/src/plugins/banx/idl.js.map +1 -1
- package/src/plugins/banx/loansFetcher.js +33 -28
- package/src/plugins/banx/loansFetcher.js.map +1 -1
- package/src/plugins/banx/offersFetcher.js +15 -16
- package/src/plugins/banx/offersFetcher.js.map +1 -1
- package/src/plugins/bucket/collateralFetcher.js +1 -1
- package/src/plugins/bucket/collateralFetcher.js.map +1 -1
- package/src/plugins/citrus/collectionsJob.js.map +1 -1
- package/src/plugins/citrus/constants.d.ts +0 -1
- package/src/plugins/citrus/constants.js +1 -2
- package/src/plugins/citrus/constants.js.map +1 -1
- package/src/plugins/citrus/loansFetcher.js +18 -20
- package/src/plugins/citrus/loansFetcher.js.map +1 -1
- package/src/plugins/clone/depositsFetcher.js +2 -2
- package/src/plugins/clone/depositsFetcher.js.map +1 -1
- package/src/plugins/compound/getPositionsV2Fetcher.js +1 -1
- package/src/plugins/compound/getPositionsV2Fetcher.js.map +1 -1
- package/src/plugins/compound/getPositionsV3Fetcher.js +5 -1
- package/src/plugins/compound/getPositionsV3Fetcher.js.map +1 -1
- package/src/plugins/drift/depositsFetcher.d.ts +3 -0
- package/src/plugins/drift/{deposits.js → depositsFetcher.js} +4 -4
- package/src/plugins/drift/depositsFetcher.js.map +1 -0
- package/src/plugins/drift/index.js +2 -2
- package/src/plugins/drift/index.js.map +1 -1
- package/src/plugins/flash/perpetualFetcher.js +1 -1
- package/src/plugins/flash/perpetualFetcher.js.map +1 -1
- package/src/plugins/flexlend/depositsFetcher.js +2 -2
- package/src/plugins/flexlend/depositsFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/constants.d.ts +1 -0
- package/src/plugins/jupiter/exchange/constants.js +2 -1
- package/src/plugins/jupiter/exchange/constants.js.map +1 -1
- package/src/plugins/jupiter/exchange/limitFetcher.js +9 -6
- package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/perpetualFetcher.js +8 -8
- package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/structs.d.ts +21 -0
- package/src/plugins/jupiter/exchange/structs.js +21 -1
- package/src/plugins/jupiter/exchange/structs.js.map +1 -1
- package/src/plugins/jupiter/pricingJob.js +7 -22
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +21 -3
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/maker/vaultsFetcher.js +1 -1
- package/src/plugins/maker/vaultsFetcher.js.map +1 -1
- package/src/plugins/mango/boostFetcher.js +1 -1
- package/src/plugins/mango/boostFetcher.js.map +1 -1
- package/src/plugins/mango/collateralFetcher.js +1 -1
- package/src/plugins/mango/collateralFetcher.js.map +1 -1
- package/src/plugins/mango/redeemFetcher.js +1 -1
- package/src/plugins/mango/redeemFetcher.js.map +1 -1
- package/src/plugins/maple/ethereumFetcher.js +1 -1
- package/src/plugins/maple/ethereumFetcher.js.map +1 -1
- package/src/plugins/marginfi/helpers.js +7 -1
- package/src/plugins/marginfi/helpers.js.map +1 -1
- package/src/plugins/mole/farmsFetcher.js +5 -1
- package/src/plugins/mole/farmsFetcher.js.map +1 -1
- package/src/plugins/morpho/aaveV3CollateralFetcher.js +1 -1
- package/src/plugins/morpho/aaveV3CollateralFetcher.js.map +1 -1
- package/src/plugins/native-stake/solana/solanaFetcher.js +2 -0
- package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
- package/src/plugins/navi/collateralFetcher.js +6 -1
- package/src/plugins/navi/collateralFetcher.js.map +1 -1
- package/src/plugins/nosana/stakingFetcher.js +8 -2
- package/src/plugins/nosana/stakingFetcher.js.map +1 -1
- package/src/plugins/port/obligationsFetcher.js +1 -1
- package/src/plugins/port/obligationsFetcher.js.map +1 -1
- package/src/plugins/rain/collectionsJob.js +6 -10
- package/src/plugins/rain/collectionsJob.js.map +1 -1
- package/src/plugins/rain/helpers.js +3 -1
- package/src/plugins/rain/helpers.js.map +1 -1
- package/src/plugins/rain/index.js +2 -1
- package/src/plugins/rain/index.js.map +1 -1
- package/src/plugins/rain/loansFetcher.js +61 -26
- package/src/plugins/rain/loansFetcher.js.map +1 -1
- package/src/plugins/rain/poolsFetcher.js +1 -1
- package/src/plugins/rain/poolsFetcher.js.map +1 -1
- package/src/plugins/rain/types.d.ts +3 -0
- package/src/plugins/sanctum/constants.d.ts +4 -0
- package/src/plugins/sanctum/constants.js +14 -0
- package/src/plugins/sanctum/constants.js.map +1 -0
- package/src/plugins/sanctum/index.d.ts +6 -0
- package/src/plugins/sanctum/index.js +12 -0
- package/src/plugins/sanctum/index.js.map +1 -0
- package/src/plugins/sanctum/lstsJob.d.ts +3 -0
- package/src/plugins/sanctum/lstsJob.js +36 -0
- package/src/plugins/sanctum/lstsJob.js.map +1 -0
- package/src/plugins/scallop/lendingsFetcher.js +1 -1
- package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
- package/src/plugins/scallop/obligationsFetcher.js +1 -1
- package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
- package/src/plugins/sharky/constants.d.ts +0 -1
- package/src/plugins/sharky/constants.js +3 -4
- package/src/plugins/sharky/constants.js.map +1 -1
- package/src/plugins/sharky/loansFetcher.js +21 -20
- package/src/plugins/sharky/loansFetcher.js.map +1 -1
- package/src/plugins/solend/helpers.js +7 -1
- package/src/plugins/solend/helpers.js.map +1 -1
- package/src/plugins/suilend/obligationsFetcher.js +7 -1
- package/src/plugins/suilend/obligationsFetcher.js.map +1 -1
- package/src/plugins/thala/vaultsFetcher.js +1 -1
- package/src/plugins/thala/vaultsFetcher.js.map +1 -1
- package/src/plugins/zeta/airdropFetcher.d.ts +3 -0
- package/src/plugins/zeta/airdropFetcher.js +105 -0
- package/src/plugins/zeta/airdropFetcher.js.map +1 -0
- package/src/plugins/zeta/constants.d.ts +3 -0
- package/src/plugins/zeta/constants.js +4 -1
- package/src/plugins/zeta/constants.js.map +1 -1
- package/src/plugins/zeta/index.js +2 -1
- package/src/plugins/zeta/index.js.map +1 -1
- package/src/plugins/zeta/types.d.ts +14 -0
- package/src/plugins/zeta/types.js +3 -0
- package/src/plugins/zeta/types.js.map +1 -0
- package/src/utils/misc/MemoizedCache.d.ts +12 -0
- package/src/utils/misc/MemoizedCache.js +35 -0
- package/src/utils/misc/MemoizedCache.js.map +1 -0
- package/src/utils/misc/arrayToMap.d.ts +1 -0
- package/src/utils/misc/arrayToMap.js +12 -0
- package/src/utils/misc/arrayToMap.js.map +1 -0
- package/src/utils/misc/pick.d.ts +2 -0
- package/src/utils/misc/pick.js +16 -0
- package/src/utils/misc/pick.js.map +1 -0
- package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js +8 -3
- package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js.map +1 -1
- package/src/plugins/banx/calculateLoanRepayValue.js.map +0 -1
- package/src/plugins/drift/deposits.js.map +0 -1
- /package/src/plugins/{drift/deposits.d.ts → allbridge/positionsFetcher.d.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,2CAKqB;AAGrB,iDAAsD;AACtD,2CAAmD;AACnD,qGAA6E;AAE7E,+CAAmE;AACnE,yCAIwB;AAExB,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;IAEnC,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAW,sBAAU,EAAE;QACxD,MAAM,EAAE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MAAM,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,CAAC;YACnE,cAAc,CAAC,IAAI,CAAC;gBAClB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE;aAC/D,CAAC,CAAC;QACL,CAAC;QAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/D,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACxD,IAAA,wCAAuB,EACrB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,CAChB,CAAC;YAEJ,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;gBACrC,SAAS;gBACT,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,UAAU;gBAChB,KAAK;gBACL,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,WAAW,EAAE,IAAI;oBACjB,YAAY;oBACZ,WAAW;oBACX,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
1
|
+
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,2CAKqB;AAGrB,iDAAsD;AAC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L,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -146,7 +146,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
146
146
|
suppliedAssets.length === 0 &&
|
147
147
|
rewardAssets.length === 0)
|
148
148
|
continue;
|
149
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
149
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
150
150
|
elements.push({
|
151
151
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
152
152
|
networkId: portfolio_core_1.NetworkId.ethereum,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/maker/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAErC,2CAQqB;AAErB,iDAAmD;AACnD,iCAA4D;AAC5D,mDAAgD;AAEhD,qGAA6E;AAC7E,0DAAwD;AAExD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,+BAA+B;IAC/B,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,0BAAS,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,YAAY,GAAG,IAAA,eAAM,EAAC,0BAAS,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAEhE,MAA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AAA,CAAC;qBACtB,QAAQ,EAAE,CAAC;gBACd,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,sBAAU,EACV,MAAM,EACN,0BAAS,CAAC,QAAQ,EAClB,aAAa,CACd,CAAC;gBACF,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,IACE,cAAc,CAAC,MAAM,KAAK,CAAC;YAC3B,cAAc,CAAC,MAAM,KAAK,CAAC;YAC3B,YAAY,CAAC,MAAM,KAAK,CAAC;YAEzB,SAAS;QACX,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;QAC5E,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,QAAQ;YAC7B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -79,7 +79,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
79
79
|
borrowedYields.push([]);
|
80
80
|
}
|
81
81
|
}
|
82
|
-
const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
82
|
+
const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
83
83
|
const element = {
|
84
84
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
85
85
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"boostFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAAwE;AACxE,iDAAsD;AACtD,qCAA8C;AAC9C,uCAAgD;AAChD,+CAA8D;AAE9D,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,2BAAkB,EAClB,0BAAc,EACd,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,yBAAa,EAAE;QACrE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAE7B,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,cAAc,CAC/C,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EACjC,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,MAAM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U;YACV,IAAI,aAAa,CAAC,eAAe,CAAC,UAAU,EAAE,EAAE,CAAC;gBAC/C,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,eAAe,CAAC;qBACxD,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC;qBAC/B,GAAG,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC;qBAC9B,QAAQ,EAAE,CAAC;gBAEd,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,UAAU,CAAC,OAAO,EAClB,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;gBACF,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1B,CAAC;YAED,SAAS;YACT,IAAI,aAAa,CAAC,eAAe,CAAC,UAAU,EAAE,EAAE,CAAC;gBAC/C,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,eAAe,CAAC;qBACxD,GAAG,EAAE;qBACL,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC;qBAC9B,GAAG,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC;qBAC9B,QAAQ,EAAE,CAAC;gBACd,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,UAAU,CAAC,OAAO,EAClB,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;gBACF,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"boostFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;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AS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -117,7 +117,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
117
117
|
}
|
118
118
|
if (suppliedAssets.length === 0 && borrowedAssets.length === 0)
|
119
119
|
continue;
|
120
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
120
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
121
121
|
elements.push({
|
122
122
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
123
123
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAA+D;AAC/D,iDAAsD;AACtD,qCAA8C;AAC9C,uCAA2C;AAC3C,+CAA+E;AAC/E,qGAA6E;AAC7E,6EAAqD;AAGrD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,2BAAkB,EAClB,sBAAU,EACV,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IACF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAiB,oBAAQ,EAAE;QAC1D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC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IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEzE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAA+D;AAC/D,iDAAsD;AACtD,qCAA8C;AAC9C,uCAA2C;AAC3C,+CAA+E;AAC/E,qGAA6E;AAC7E,6EAAqD;AAGrD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,2BAAkB,EAClB,sBAAU,EACV,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IACF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAiB,oBAAQ,EAAE;QAC1D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,MAAM,WAAW,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC3C,MAAM,WAAW,GAA8B,IAAI,GAAG,EAAE,CAAC;IACzD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACvC,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C,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;YACD,IAAI,EAAE,IAAA,wBAAe,EAAC,WAAW,CAAC,IAAI,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -94,7 +94,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
94
94
|
if (suppliedAssets.length === 0)
|
95
95
|
return [];
|
96
96
|
const elements = [];
|
97
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
97
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
98
98
|
elements.push({
|
99
99
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
100
100
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"redeemFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/redeemFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AAGpC,2CAKqB;AACrB,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAyC;AACzC,qCAAqE;AACrE,6EAAqD;AACrD,qGAA6E;AAE7E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YAAY,CAAC;iBACnC,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC;iBACpC,QAAQ,EAAE,CAAC;YAEd,IAAI,aAAa,KAAK,CAAC,EAAE,CAAC;gBACxB,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,SAAS,EACT,aAAa,EACb,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE3C,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"redeemFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/redeemFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AAGpC,2CAKqB;AACrB,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAyC;AACzC,qCAAqE;AACrE,6EAAqD;AACrD,qGAA6E;AAE7E,MAAM,KAAK,GAAG;IACZ,6CAA6C;IAC7C,8CAA8C;IAC9C,8CAA8C;IAC9C,6CAA6C;IAC7C,8CAA8C;IAC9C,6CAA6C;IAC7C,8CAA8C;IAC9C,kCAAkC;IAClC,8CAA8C;IAC9C,kCAAkC;IAClC,6CAA6C;IAC7C,8CAA8C;IAC9C,6CAA6C;IAC7C,kCAAkC;IAClC,8CAA8C;IAC9C,8CAA8C;CAC/C,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB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AAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;IAE5E,QAAQ,CAAC,IAAI,CAAC;QACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;QACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,UAAU,EAAV,sBAAU;QACV,KAAK,EAAE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,WAAW;YACX,YAAY;YACZ,WAAW;YACX,KAAK;SACN;QACD,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -61,7 +61,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
61
61
|
suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(asset, balance.toNumber(), portfolio_core_1.NetworkId.ethereum, tokenPrice));
|
62
62
|
if (suppliedAssets.length === 0)
|
63
63
|
continue;
|
64
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
64
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
65
65
|
elements.push({
|
66
66
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
67
67
|
networkId: portfolio_core_1.NetworkId.ethereum,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ethereumF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CACjB,IAAA,gCAAsB,EACpB,KAAK,EACL,OAAO,CAAC,QAAQ,EAAE,EAClB,0BAAS,CAAC,QAAQ,EAClB,UAAU,CACX,CACF,CAAC;QACF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAE1C,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;QAE5E,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,QAAQ;YAC7B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI;YACJ,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -99,7 +99,13 @@ function getElementFromAccount(marginfiAccount, banksInfoByAddress, tokenPriceBy
|
|
99
99
|
}
|
100
100
|
if (suppliedAssets.length === 0 && borrowedAssets.length === 0)
|
101
101
|
return null;
|
102
|
-
const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(
|
102
|
+
const { borrowedValue, healthRatio, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
103
|
+
suppliedAssets,
|
104
|
+
borrowedAssets,
|
105
|
+
rewardAssets,
|
106
|
+
suppliedLtvs,
|
107
|
+
borrowedWeights,
|
108
|
+
});
|
103
109
|
return {
|
104
110
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
105
111
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marginfi/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,4DAAiC;AACjC,+DAQoC;AAIpC,qGAA6E;AAC7E,2CAAyC;AAEzC,SAAgB,wBAAwB,CACtC,EAAE,KAAK,EAAwB,EAC/B,YAAY,GAAG,CAAC;IAEhB,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC;IAEpC,MAAM,OAAO,GAAG,IAAI,oBAAO,CACzB,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CACnE,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,YAAY,CAAA,CAAC,CAAC;IAChC,OAAO,IAAI,sBAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC3C,CAAC;AAVD,4DAUC;AAED,SAAS,yBAAyB,CAAC,IAAU;IAC3C,OAAO,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,KAAK,CAC9D,wBAAwB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CACnD,CAAC;AACJ,CAAC;AACD,SAAS,qBAAqB,CAAC,IAAU;IACvC,OAAO,wBAAwB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAC1D,wBAAwB,CAAC,IAAI,CAAC,eAAe,CAAC,CAC/C,CAAC;AACJ,CAAC;AACD,SAAS,sBAAsB,CAAC,IAAU;IACxC,MAAM,MAAM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EAAE,CAAC;YAC5C,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YAC9C,MAAM,cAAc,GAAG,wBAAwB,CAAC,OAAO,CAAC,eAAe,CAAC;iBACrE,KAAK,CAAC,QAAQ,CAAC,0BAA0B,CAAC;iBAC1C,QAAQ,EAAE,CAAC;YAEd,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EACxB,cAAc,EACd,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;YACF,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAE5E,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC;QACtB,cAAc;QACd,cAAc;QACd,YAAY;QACZ,YAAY;QACZ,eAAe;KAChB,CAAC,CAAC;IAEL,OAAO;QACL,IAAI,EAAE,qCAAoB,CAAC,UAAU;QACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,UAAU,EAAV,sBAAU;QACV,KAAK,EAAE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,WAAW;YACX,YAAY;YACZ,WAAW;YACX,KAAK;SACN;KACF,CAAC;AACJ,CAAC;AAzFD,sDAyFC"}
|
@@ -111,7 +111,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
111
111
|
suppliedAssets.length === 0 &&
|
112
112
|
rewardAssets.length === 0)
|
113
113
|
return;
|
114
|
-
const { borrowedValue, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(
|
114
|
+
const { borrowedValue, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
115
|
+
suppliedAssets,
|
116
|
+
borrowedAssets,
|
117
|
+
rewardAssets,
|
118
|
+
});
|
115
119
|
elements.push({
|
116
120
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
117
121
|
networkId: portfolio_core_1.NetworkId.sui,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mole/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8DAA+D;AAC/D,+DASoC;AACpC,gEAAqC;AAGrC,2CAA8E;AAC9E,iDAAmD;AAEnD,uCAAiD;AACjD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,QAAQ,GAAuB,EAAE,CAAC;IAExC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1C,KAAK,CAAC,OAAO,CAAW,mBAAO,EAAE;YAC/B,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,KAAK,CAAC,OAAO,CAAoB,wBAAY,EAAE;YAC7C,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,SAAS;QACpE,OAAO,EAAE,CAAC;IAEZ,MAAM,UAAU,GAAa,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC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AS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -68,7 +68,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
68
68
|
borrowedYields.push([]);
|
69
69
|
borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, portfolio_core_1.NetworkId.ethereum, tokenPrice));
|
70
70
|
});
|
71
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
71
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
72
72
|
if (borrowedValue === 0 && suppliedValue === 0)
|
73
73
|
return [];
|
74
74
|
const element = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"aaveV3CollateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/morpho/aaveV3CollateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,2CAAqD;AAGrD,uCAGmB;AACnB,qGAA6E;AAE7E,MAAM,qBAAqB,GAAG;IAC5B,sBAAU,CAAC,MAAM;IACjB,sBAAU,CAAC,GAAG;IACd,sBAAU,CAAC,IAAI;IACf,sBAAU,CAAC,IAAI;IACf,sBAAU,CAAC,IAAI;IACf,sBAAU,CAAC,KAAK;IAChB,sBAAU,CAAC,IAAI;CAChB,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACzD,IAAA,yCAA+B,EAAC,CAAC,EAAE,KAAK,CAAC,CAC1C,CAAC;IACF,MAAM,cAAc,GAAG,qBAAqB,CAAC,GAAG,CAAC,CA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c,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACzD,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,UAAU;YAAE,OAAO;QACxB,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;aACnD,GAAG,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC;aAC9B,QAAQ,EAAE,CAAC;QACd,IAAI,MAAM,KAAK,CAAC;YAAE,OAAO;QACzB,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxB,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,UAAU,CAAC,OAAO,EAClB,MAAM,EACN,0BAAS,CAAC,QAAQ,EAClB,UAAU,CACX,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"aaveV3CollateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/morpho/aaveV3CollateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,2CAAqD;AAGrD,uCAGmB;AACnB,qGAA6E;AAE7E,MAAM,qBAAqB,GAAG;IAC5B,sBAAU,CAAC,MAAM;IACjB,sBAAU,CAAC,GAAG;IACd,sBAAU,CAAC,IAAI;IACf,sBAAU,CAAC,IAAI;IACf,sBAAU,CAAC,IAAI;IACf,sBAAU,CAAC,KAAK;IAChB,sBAAU,CAAC,IAAI;CAChB,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,K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AE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,WAAW;YACX,YAAY;YACZ,WAAW;YACX,KAAK;SACN;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,qBAAqB;IACtC,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -81,8 +81,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
81
81
|
else {
|
82
82
|
tags.push('Active');
|
83
83
|
}
|
84
|
+
const lockedUntil = stakeAccount.lockup.unixTimestamp.times(1000).toNumber() || undefined;
|
84
85
|
nativeAssets.push(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(portfolio_core_1.solanaNetwork.native.address, amount, portfolio_core_1.NetworkId.solana, solTokenPrice, undefined, {
|
85
86
|
tags,
|
87
|
+
lockedUntil,
|
86
88
|
})));
|
87
89
|
}
|
88
90
|
if (nativeAssets.length > 20) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA+D;AAC/D,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAA+C;AAC/C,wGAAgF;AAChF,wDAA4E;AAC5E,oDAAoE;AACpE,2CAIqB;AAErB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IA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CAAC,MAAM,CAAC,OAAO,EAC5B,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,aAAa,EACb,SAAS,EACT;YACE,IAAI;
|
1
|
+
{"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA+D;AAC/D,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAA+C;AAC/C,wGAAgF;AAChF,wDAA4E;AAC5E,oDAAoE;AACpE,2CAIqB;AAErB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAA,6BAAmB,EAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEtD,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,4BAAkB,EAClB,0BAAc,EACd,OAAO,CACR,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE1C,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,aAAa,CAC7C,8BAAa,CAAC,MAAM,CAAC,OAAO,EAC5B,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAY,6BAAiB,EAAE;QAClE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC;IAE/B,IAAI,iBAAiB,GAAG,CAAC,CAAC;IAC1B,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,iBAAiB,GAAG,CAAC,CAAC;IAC1B,IAAI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EAAE,WAAW,EAAE,IAAI,EAAE;iBAEpC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AACF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -112,7 +112,12 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
112
112
|
borrowedAssets.length === 0 &&
|
113
113
|
rewardAssets.length === 0)
|
114
114
|
return [];
|
115
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(
|
115
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({
|
116
|
+
suppliedAssets,
|
117
|
+
borrowedAssets,
|
118
|
+
rewardAssets,
|
119
|
+
suppliedLtvs,
|
120
|
+
});
|
116
121
|
const element = {
|
117
122
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
118
123
|
networkId: portfolio_core_1.NetworkId.sui,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/navi/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AACnD,qGAA6E;AAE7E,iFAA8E;AAC9E,+DAA4D;AAE5D,MAAM,YAAY,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,EAAE,CAAA,CAAC,CAAC;AAE7C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,cAAc,GAAqB,EAAE,CAAC;IAC5C,M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AAC,IAAI,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE;YACnC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;gBACf,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAChC,IAAA,mCAAkB,EAAC,QAAQ,EAAE,0BAAS,CAAC,GAAG,CAAC,CAC5C,CAAC;gBAEF,IAAI,UAAU,EAAE,CAAC;oBACf,YAAY,CAAC,IAAI,CACf,IAAA,gCAAsB,EACpB,QAAQ,EACR,IAAI,sBAAS,CAAC,MAAM,CAAC;yBAClB,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC;yBACpC,QAAQ,EAAE,EACb,0BAAS,CAAC,GAAG,EACb,UAAU,CACX,CACF,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IACE,cAAc,CAAC,MAAM,KAAK,CAAC;QAC3B,cAAc,CAAC,MAAM,KAAK,CAAC;QAC3B,YAAY,CAAC,MAAM,KAAK,CAAC;QAEzB,OAAO,EAAE,CAAC;IAEZ,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,
|
1
|
+
{"version":3,"file":"collateralFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/navi/collateralFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AACnD,qGAA6E;AAE7E,iFAA8E;AAC9E,+DAA4D;AAE5D,MAAM,YAAY,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,EAAE,CAAA,CAAC,CAAC;AAE7C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,s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AW;YACX,KAAK;SACN;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -20,20 +20,26 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
|
|
20
20
|
const structs_1 = require("./structs");
|
21
21
|
const helpers_1 = require("./helpers");
|
22
22
|
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
23
|
+
const solana_1 = require("../../utils/solana");
|
23
24
|
const nosFactor = new bignumber_js_1.default(Math.pow(10, constants_1.nosDecimals));
|
24
25
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
26
|
const client = (0, clients_1.getClientSolana)();
|
26
27
|
const stakeAccount = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, structs_1.stakeStruct, (0, helpers_1.getStakePubKey)(owner));
|
27
28
|
if (!stakeAccount || stakeAccount.amount.isZero())
|
28
29
|
return [];
|
30
|
+
const [vaultAccount, tokenPrice] = yield Promise.all([
|
31
|
+
(0, getParsedAccountInfo_1.getParsedAccountInfo)(client, solana_1.tokenAccountStruct, stakeAccount.vault),
|
32
|
+
cache.getTokenPrice(constants_1.nosMint, portfolio_core_1.NetworkId.solana),
|
33
|
+
]);
|
34
|
+
if (!vaultAccount || vaultAccount.amount.isZero())
|
35
|
+
return [];
|
29
36
|
const lockedUntil = stakeAccount.timeUnstake.isZero()
|
30
37
|
? undefined
|
31
38
|
: stakeAccount.timeUnstake
|
32
39
|
.plus(stakeAccount.duration)
|
33
40
|
.times(1000)
|
34
41
|
.toNumber();
|
35
|
-
const
|
36
|
-
const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.nosMint, stakeAccount.amount.dividedBy(nosFactor).toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice, undefined, { lockedUntil });
|
42
|
+
const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.nosMint, vaultAccount.amount.dividedBy(nosFactor).toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice, undefined, { lockedUntil });
|
37
43
|
return [
|
38
44
|
{
|
39
45
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nosana/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAC7E,gEAAqC;AAGrC,2CAA+D;AAC/D,iDAAsD;AACtD,qGAA6E;AAC7E,uCAAwC;AACxC,uCAA2C;AAC3C,kFAA+E;
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nosana/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAC7E,gEAAqC;AAGrC,2CAA+D;AAC/D,iDAAsD;AACtD,qGAA6E;AAC7E,uCAAwC;AACxC,uCAA2C;AAC3C,kFAA+E;AAC/E,+CAAwD;AAExD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AAEnD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,MAAM,IAAA,2CAAoB,EAC7C,MAAM,EACN,qBAAW,EACX,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IACF,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,CAAC;IAE7D,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CA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&& borrowedAssets.length === 0)
|
127
127
|
continue;
|
128
|
-
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
128
|
+
const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)({ suppliedAssets, borrowedAssets, rewardAssets });
|
129
129
|
elements.push({
|
130
130
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
131
131
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/port/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAAoD;AAEpD,+CAA8D;AAC9D,uCAA6C;AAC7C,iDAAsD;AACtD,uCAA8C;AAC9C,uCAAoD;AACpD,qGAA6E;AAC7E,6FAAoE;AACpE,mDAAkD;AAElD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,WAAW,GAAG,MAAM,IAAA,iCAAwB,EAChD,MAAM,EACN,0BAAgB,EAChB,qBAAS,EACT,IAAA,2BAAiB,EAAC,KAAK,CAAC,CACzB,CAAC;IACF,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAExC,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,QAAQ,CACvC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,EAClD;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IAEF,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,EA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CAAC,IAAI,sBAAS,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;yBACxD,GAAG,CAAC,MAAM,CAAC,wBAAwB,CAAC;yBACpC,SAAS,CAAC,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,uBAAW,GAAG,QAAQ,CAAC,CAAA,CAAC,CAAC;yBACxD,QAAQ,EAAE,CAAC;oBAEd,MAAM,GAAG,GAAG,IAAA,kBAAQ,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;oBACxC,MAAM,eAAe,GAAY;wBAC/B;4BACE,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,GAAG,CAAC;4BACnB,GAAG,EAAE,CAAC,GAAG;yBACV;qBACF,CAAC;oBACF,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;oBACrC,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,KAAK,EACL,cAAc,EACd,0BAAS,CAAC,MAAM,EAChB,WAAW,CACZ,CACF,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEzE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/port/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAAoD;AAEpD,+CAA8D;AAC9D,uCAA6C;AAC7C,iDAAsD;AACtD,uCAA8C;AAC9C,uCAAoD;AACpD,qGAA6E;AAC7E,6FAAoE;AACpE,mDAAkD;AAElD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,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,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEzE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EAAC,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;QAE5E,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -12,20 +12,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
13
|
const constants_1 = require("./constants");
|
14
14
|
const helpers_1 = require("./helpers");
|
15
|
+
const pick_1 = require("../../utils/misc/pick");
|
15
16
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
16
17
|
const collections = yield (0, helpers_1.getCollections)();
|
17
|
-
const
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
22
|
-
}));
|
23
|
-
}
|
24
|
-
promises.push(cache.setItem(constants_1.collectionsKey, collections, {
|
18
|
+
const filteredCollections = collections
|
19
|
+
.filter((c) => !c.isDefi)
|
20
|
+
.map((c) => (0, pick_1.pick)(c, ['collectionId', 'name', 'floorPrice']));
|
21
|
+
yield cache.setItem(constants_1.collectionsKey, filteredCollections, {
|
25
22
|
prefix: constants_1.platformId,
|
26
23
|
networkId: portfolio_core_1.NetworkId.solana,
|
27
|
-
})
|
28
|
-
yield Promise.all(promises);
|
24
|
+
});
|
29
25
|
});
|
30
26
|
const job = {
|
31
27
|
id: `${constants_1.platformId}-collections`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collectionsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/collectionsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAyD;AACzD,uCAA2C;
|
1
|
+
{"version":3,"file":"collectionsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/collectionsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAyD;AACzD,uCAA2C;AAC3C,gDAA6C;AAG7C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAc,GAAE,CAAC;IAC3C,MAAM,mBAAmB,GAAG,WAAW;SACpC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;SACxB,GAAG,CACF,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,CAAqB,CAC3E,CAAC;IAEJ,MAAM,KAAK,CAAC,OAAO,CAAC,0BAAc,EAAE,mBAAmB,EAAE;QACvD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -45,7 +45,9 @@ exports.getPoolPda = getPoolPda;
|
|
45
45
|
function getLoans(owner) {
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
47
47
|
const getLoansRes = yield axios_1.default
|
48
|
-
.get(`${constants_1.rainApi}/loans/user?pubkey=${owner}`, {
|
48
|
+
.get(`${constants_1.rainApi}/loans/user?pubkey=${owner}&status=Ongoing`, {
|
49
|
+
timeout: 1000,
|
50
|
+
})
|
49
51
|
.catch(() => null);
|
50
52
|
if (!getLoansRes || getLoansRes.data.ongoingCount === 0)
|
51
53
|
return [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAiD;AASjD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEnC,SAAsB,OAAO,CAAC,IAAY;;QACxC,MAAM,WAAW,GAAuC,MAAM,eAAK;aAChE,GAAG,CAAC,GAAG,mBAAO,sBAAsB,IAAI,EAAE,CAAC;aAC3C,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI;YAAE,OAAO,SAAS,CAAC;QACxD,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;IAC/B,CAAC;CAAA;AAND,0BAMC;AAED,SAAsB,cAAc;;QAClC,MAAM,iBAAiB,GACrB,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,mBAAO,cAAc,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,iBAAiB,IAAI,CAAC,iBAAiB,CAAC,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AAI,CAAC,iBAAiB,IAAI,CAAC,iBAAiB,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QAC7D,OAAO,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5C,CAAC;CAAA;AALD,wCAKC;AAED,SAAgB,UAAU,CAAC,KAAa;IACtC,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,EACjE,qBAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AALD,gCAKC;AAED,SAAsB,QAAQ,CAAC,KAAa;;QAC1C,MAAM,WAAW,GAAwC,MAAM,eAAK;aACjE,GAAG,CAAC,GAAG,mBAAO,sBAAsB,KAAK,iBAAiB,EAAE;YAC3D,OAAO,EAAE,IAAI;SACd,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACnE,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;IAChC,CAAC;CAAA;AARD,4BAQC;AAED,SAAgB,gBAAgB,CAAC,KAAW,EAAE,GAAS;IACrD,OAAO,IAAI,sBAAS,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;SAChC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SACtB,SAAS,CAAC,MAAM,CAAC;SACjB,aAAa,CAAC,CAAC,EAAE,sBAAS,CAAC,UAAU,CAAC;SACtC,QAAQ,EAAE,CAAC;AAChB,CAAC;AAND,4CAMC"}
|
@@ -7,7 +7,8 @@ exports.fetchers = exports.jobs = exports.platforms = void 0;
|
|
7
7
|
const constants_1 = require("./constants");
|
8
8
|
const poolsFetcher_1 = __importDefault(require("./poolsFetcher"));
|
9
9
|
const loansFetcher_1 = __importDefault(require("./loansFetcher"));
|
10
|
+
const collectionsJob_1 = __importDefault(require("./collectionsJob"));
|
10
11
|
exports.platforms = [constants_1.platform];
|
11
|
-
exports.jobs = [];
|
12
|
+
exports.jobs = [collectionsJob_1.default];
|
12
13
|
exports.fetchers = [poolsFetcher_1.default, loansFetcher_1.default];
|
13
14
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,kEAA0C;AAC1C,kEAA0C;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,kEAA0C;AAC1C,kEAA0C;AAC1C,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,wBAAc,CAAC,CAAC;AAC/B,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,sBAAY,CAAC,CAAC"}
|