risk: disable for now
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
c0c96abbec
commit
21b8c0dbfa
|
@ -461,20 +461,25 @@ export async function getRiskStats(
|
||||||
.map((bank) => bank.mint.toString()),
|
.map((bank) => bank.mint.toString()),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
const prices = await getOnChainPriceForMints([
|
|
||||||
...new Set(
|
// Note:
|
||||||
Array.from(group.banksMapByTokenIndex.values())
|
// Disable for now
|
||||||
.flat()
|
// Getting rate limited
|
||||||
.map((bank) => bank.mint.toString()),
|
// const prices = await getOnChainPriceForMints([
|
||||||
),
|
// ...new Set(
|
||||||
]);
|
// Array.from(group.banksMapByTokenIndex.values())
|
||||||
const onChainPrices = Object.fromEntries(
|
// .flat()
|
||||||
prices.map((price, i) => [mints[i], price]),
|
// .map((bank) => bank.mint.toString()),
|
||||||
);
|
// ),
|
||||||
|
// ]);
|
||||||
|
// const onChainPrices = Object.fromEntries(
|
||||||
|
// prices.map((price, i) => [mints[i], price]),
|
||||||
|
// );
|
||||||
|
|
||||||
Array.from(group.banksMapByTokenIndex.values())
|
Array.from(group.banksMapByTokenIndex.values())
|
||||||
.flat()
|
.flat()
|
||||||
.forEach((b) => {
|
.forEach((b) => {
|
||||||
b['onChainPrice'] = onChainPrices[b.mint.toBase58()];
|
b['onChainPrice'] = b.uiPrice;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Clone group, and simulate change % price drop for all assets except stables
|
// Clone group, and simulate change % price drop for all assets except stables
|
||||||
|
|
Loading…
Reference in New Issue