@curvefi/api 2.65.19 → 2.65.20
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/lib/pools/PoolTemplate.js +19 -1
- package/package.json +1 -1
|
@@ -707,8 +707,26 @@ export class PoolTemplate extends CorePool {
|
|
|
707
707
|
return __awaiter(this, void 0, void 0, function* () {
|
|
708
708
|
const amountsBN = amounts.map(BN);
|
|
709
709
|
let pricesBN = [];
|
|
710
|
+
const multicallContract = curve.contracts[this.address].multicallContract;
|
|
710
711
|
if (this.isCrypto || this.id === 'wsteth') {
|
|
711
|
-
|
|
712
|
+
if (curve.isLiteChain) {
|
|
713
|
+
const prices = this.id.includes('twocrypto')
|
|
714
|
+
? [
|
|
715
|
+
1,
|
|
716
|
+
Number(yield curve.contracts[this.address].contract.price_oracle()) / (Math.pow(10, 18)),
|
|
717
|
+
]
|
|
718
|
+
: [
|
|
719
|
+
1,
|
|
720
|
+
...(yield curve.multicallProvider.all([
|
|
721
|
+
multicallContract.price_oracle(0),
|
|
722
|
+
multicallContract.price_oracle(1),
|
|
723
|
+
])).map((value) => Number(value) / (Math.pow(10, 18))),
|
|
724
|
+
];
|
|
725
|
+
pricesBN = prices.map(BN);
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
pricesBN = (yield this._underlyingPrices()).map(BN);
|
|
729
|
+
}
|
|
712
730
|
}
|
|
713
731
|
else {
|
|
714
732
|
pricesBN = yield this._storedRatesBN(true);
|