Skip to content

Commit

Permalink
fix usdc decoding in mango edit (#1837)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 authored Sep 25, 2023
1 parent f617305 commit 383fba9
Showing 1 changed file with 16 additions and 1 deletion.
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

1 comment on commit 383fba9

@vercel
Copy link

@vercel vercel bot commented on 383fba9 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

governance-ui – ./

governance-ui-solana-labs.vercel.app
governance-ui-git-main-solana-labs.vercel.app
app.realms.today

Please sign in to comment.