diff --git a/components/instructions/programs/mangoV4.tsx b/components/instructions/programs/mangoV4.tsx index 4468904f18..e53f71e265 100644 --- a/components/instructions/programs/mangoV4.tsx +++ b/components/instructions/programs/mangoV4.tsx @@ -813,7 +813,7 @@ const instructions = () => ({ bank.nativeDeposits().mul(bank.price).toNumber() )[liqudityTier.tier!] suggestedUntrusted = liqudityTier.tier === 'UNTRUSTED' - console.log(suggestedPreset) + const suggestedFormattedPreset: | EditTokenArgsFormatted | Record = Object.keys(suggestedPreset).length diff --git a/pages/dao/[symbol]/proposal/[pk]/ProposalWarnings.tsx b/pages/dao/[symbol]/proposal/[pk]/ProposalWarnings.tsx index 151fe443c5..9403f3bdb4 100644 --- a/pages/dao/[symbol]/proposal/[pk]/ProposalWarnings.tsx +++ b/pages/dao/[symbol]/proposal/[pk]/ProposalWarnings.tsx @@ -129,12 +129,13 @@ const useProposalSafetyCheck = (proposal: Proposal) => { config === undefined || transactions === undefined ) - return undefined + return [] const ixs = transactions.flatMap((pix) => pix.account.getAllInstructions()) const possibleWrongGovernance = - transactions?.length && + treasuryAddress.result && + !!transactions?.length && !walletsPassedToInstructions?.find( (x) => governance?.pubkey.equals(x) || treasuryAddress.result?.equals(x) ) @@ -174,7 +175,14 @@ const useProposalSafetyCheck = (proposal: Proposal) => { } return realmConfigWarnings - }, [config, transactions, realmInfo]) + }, [ + realmInfo, + config, + transactions, + walletsPassedToInstructions, + governance?.pubkey, + treasuryAddress.result, + ]) return realmConfigWarnings }