Skip to content

Commit

Permalink
fix warning stale state (#1854)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 authored Oct 4, 2023
1 parent 58131e3 commit 046ad17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/instructions/programs/mangoV4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, never> = Object.keys(suggestedPreset).length
Expand Down
14 changes: 11 additions & 3 deletions pages/dao/[symbol]/proposal/[pk]/ProposalWarnings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down Expand Up @@ -174,7 +175,14 @@ const useProposalSafetyCheck = (proposal: Proposal) => {
}

return realmConfigWarnings
}, [config, transactions, realmInfo])
}, [
realmInfo,
config,
transactions,
walletsPassedToInstructions,
governance?.pubkey,
treasuryAddress.result,
])

return realmConfigWarnings
}
Expand Down

1 comment on commit 046ad17

@vercel
Copy link

@vercel vercel bot commented on 046ad17 Oct 4, 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 – ./

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

Please sign in to comment.