From 40528cb287d72a2e7bb9ba00dd7673d6270dbbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezin=CC=81ski?= Date: Thu, 16 Nov 2023 16:49:18 +0100 Subject: [PATCH 1/2] fix --- components/instructions/programs/mangoV4.tsx | 21 ++++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/components/instructions/programs/mangoV4.tsx b/components/instructions/programs/mangoV4.tsx index d86a9711ea..c6039c6f80 100644 --- a/components/instructions/programs/mangoV4.tsx +++ b/components/instructions/programs/mangoV4.tsx @@ -256,16 +256,15 @@ const instructions = () => ({ )[liqudityTier.tier] const suggestedUntrusted = liqudityTier.tier === 'UNTRUSTED' - const suggestedFormattedPreset: ListingArgsFormatted = Object.keys( - suggestedPreset - ).length - ? getFormattedListingValues({ - tokenIndex: args.tokenIndex, - name: args.name, - oracle: args.oracle, - ...suggestedPreset, - }) - : ({} as ListingArgsFormatted) + const suggestedFormattedPreset: ListingArgsFormatted = + Object.keys(suggestedPreset).length && !suggestedUntrusted + ? getFormattedListingValues({ + tokenIndex: args.tokenIndex, + name: args.name, + oracle: args.oracle, + ...suggestedPreset, + }) + : ({} as ListingArgsFormatted) const invalidKeys: (keyof ListingArgsFormatted)[] = Object.keys( suggestedPreset @@ -1566,7 +1565,7 @@ const DisplayNullishProperty = ({ {currentValue} - {
/
} + {currentValue &&
/
}
{value}
From 9b66407b17226de29ec8ab3bdb19605ac5b48c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezin=CC=81ski?= Date: Thu, 16 Nov 2023 16:50:48 +0100 Subject: [PATCH 2/2] fix --- components/instructions/programs/mangoV4.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/instructions/programs/mangoV4.tsx b/components/instructions/programs/mangoV4.tsx index c6039c6f80..a6656410bb 100644 --- a/components/instructions/programs/mangoV4.tsx +++ b/components/instructions/programs/mangoV4.tsx @@ -937,7 +937,8 @@ const instructions = () => ({

Very low liquidity Price impact of {liqudityTier?.priceImpact} - % on $1000 swap. Check params carefully + % on $1000 swap. Check params carefully token should be listed + with untrusted instruction

)}