diff --git a/packages/common/src/utils/ids.ts b/packages/common/src/utils/ids.ts index 608940e..41582f9 100644 --- a/packages/common/src/utils/ids.ts +++ b/packages/common/src/utils/ids.ts @@ -95,9 +95,9 @@ export const PROGRAM_IDS = [ name: 'devnet', timelock: () => ({ programAccountId: new PublicKey( - 'Hn2FtiPy4fYu4WgEeuvF8Y6os412a1iQvam2rrT6ibX1', + 'Gc6ktQPgHDxf9GpN6CdLEnkkqj5NfGYJeLDWFLoN3wNb', ), - programId: new PublicKey('5naVRdHoPFFQd2vTcWywyHthqqYziKvwu8urSxzV6Qj4'), + programId: new PublicKey('FmxAXMEKaj7BvgH9zdRNMZZYdAk4mBeRdSQwUoM3QYYw'), }), wormhole: () => ({ pubkey: new PublicKey('WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC'), diff --git a/packages/proposals/src/actions/createProposal.ts b/packages/proposals/src/actions/createProposal.ts index a4c1167..68ddaad 100644 --- a/packages/proposals/src/actions/createProposal.ts +++ b/packages/proposals/src/actions/createProposal.ts @@ -272,7 +272,7 @@ async function getAssociatedAccountsAndInstructions( wallet.publicKey, accountRentExempt, yesVoteMint, - wallet.publicKey, + authority, holdingSigners, ); @@ -281,7 +281,7 @@ async function getAssociatedAccountsAndInstructions( wallet.publicKey, accountRentExempt, noVoteMint, - wallet.publicKey, + authority, holdingSigners, ); @@ -290,7 +290,7 @@ async function getAssociatedAccountsAndInstructions( wallet.publicKey, accountRentExempt, timelockConfig.info.governanceMint, - wallet.publicKey, + authority, holdingSigners, ); diff --git a/packages/proposals/src/actions/execute.ts b/packages/proposals/src/actions/execute.ts index a052ef3..77f277d 100644 --- a/packages/proposals/src/actions/execute.ts +++ b/packages/proposals/src/actions/execute.ts @@ -23,14 +23,7 @@ export const execute = async ( let signers: Account[] = []; let instructions: TransactionInstruction[] = []; - - const [authority] = await PublicKey.findProgramAddress( - [PROGRAM_IDS.timelock.programAccountId.toBuffer()], - PROGRAM_IDS.timelock.programId, - ); - const actualMessage = decodeBufferIntoMessage(transaction.info.instruction); - console.log('Actual message', actualMessage); const accountInfos = getAccountInfos(actualMessage); instructions.push( @@ -38,7 +31,7 @@ export const execute = async ( transaction.pubkey, proposal.pubkey, actualMessage.accountKeys[actualMessage.instructions[0].programIdIndex], - authority, + proposal.info.config, accountInfos, ), ); diff --git a/packages/proposals/src/actions/withdrawVotingTokens.ts b/packages/proposals/src/actions/withdrawVotingTokens.ts index 1f04b8a..7cf8f57 100644 --- a/packages/proposals/src/actions/withdrawVotingTokens.ts +++ b/packages/proposals/src/actions/withdrawVotingTokens.ts @@ -119,7 +119,6 @@ export const withdrawVotingTokens = async ( proposal.info.noVotingDump, proposal.info.votingMint, proposal.pubkey, - proposal.info.config, transferAuthority.publicKey, yesTransferAuthority.publicKey, noTransferAuthority.publicKey, diff --git a/packages/proposals/src/components/Proposal/RegisterToVote.tsx b/packages/proposals/src/components/Proposal/RegisterToVote.tsx index dc6187d..10754e3 100644 --- a/packages/proposals/src/components/Proposal/RegisterToVote.tsx +++ b/packages/proposals/src/components/Proposal/RegisterToVote.tsx @@ -46,7 +46,10 @@ export function RegisterToVote({ const eligibleToView = (timelockConfig.info.votingEntryRule == VotingEntryRule.DraftOnly && proposal.info.state.status == TimelockStateStatus.Draft) || - timelockConfig.info.votingEntryRule == VotingEntryRule.Anytime; + (timelockConfig.info.votingEntryRule == VotingEntryRule.Anytime && + [TimelockStateStatus.Draft, TimelockStateStatus.Voting].includes( + proposal.info.state.status, + )); const [_, setTokenAmount] = useState(1); return eligibleToView ? (