Skip to content
This repository has been archived by the owner on Feb 9, 2025. It is now read-only.

Commit

Permalink
fallback for broken group.pis mango edit token (#2108)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 authored Feb 4, 2024
1 parent a73bb61 commit dfed814
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/instructions/programs/mangoV4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,9 @@ const instructions = () => ({
mintData = tokenPriceService.getTokenInfo(mint.toBase58())
const isPyth = bank?.oracleProvider === OracleProvider.Pyth

const midPriceImpacts = getMidPriceImpacts(mangoGroup.pis)
const midPriceImpacts = getMidPriceImpacts(
mangoGroup.pis.length ? mangoGroup.pis : []
)

const tokenToPriceImpact = midPriceImpacts
.filter(
Expand Down

0 comments on commit dfed814

Please sign in to comment.