Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix usdc decoding in mango edit #1837

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion components/instructions/programs/mangoV4.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
MANGO_V4_ID,
MangoClient,
USDC_MINT,
toUiDecimals,
} from '@blockworks-foundation/mango-v4'
import AdvancedOptionsDropdown from '@components/NewRealmWizard/components/AdvancedOptionsDropdown'
Expand Down Expand Up @@ -799,7 +800,12 @@ const instructions = () => ({
args.oracleOpt ||
mangoGroup.banksMapByMint.get(mint.toBase58())![0]!.oracle
const isPyth = await isPythOracle(connection, oracle)
liqudityTier = await getSuggestedCoinTier(mint.toBase58(), !!isPyth)
liqudityTier = !mint.equals(USDC_MINT)
? await getSuggestedCoinTier(mint.toBase58(), !!isPyth)
: {
tier: 'PREMIUM',
priceImpact: '0',
}

const suggestedPreset = getFormattedListingPresets(!!isPyth)[
liqudityTier.tier!
Expand Down Expand Up @@ -867,6 +873,15 @@ const instructions = () => ({
{coinTiersToNames[liqudityTier.tier]} check params carefully
</h3>
)}
<div className="py-4">
<div className="flex mb-2">
<div className="w-3 h-3 bg-orange mr-2"></div> - Proposed values
</div>
<div className="flex">
<div className="w-3 h-3 bg-green mr-2"></div> - Suggested by
liqudity
</div>
</div>
<div className="border-b mb-4 pb-4 space-y-3">
<DisplayNullishProperty
label="Token index"
Expand Down