Deref program account
This commit is contained in:
parent
056e33370b
commit
eae05f2c3b
|
@ -104,7 +104,7 @@ pub mod multisig {
|
|||
}
|
||||
|
||||
// Execute the multisig transaction.
|
||||
let ix: Instruction = ctx.accounts.transaction.account().into();
|
||||
let ix: Instruction = (&*ctx.accounts.transaction).into();
|
||||
let seeds = &[
|
||||
ctx.accounts.multisig.to_account_info().key.as_ref(),
|
||||
&[ctx.accounts.multisig.nonce],
|
||||
|
|
|
@ -16,12 +16,6 @@ pub struct ProgramAccount<'info, T: AccountSerialize + AccountDeserialize + Clon
|
|||
inner: Box<Inner<'info, T>>,
|
||||
}
|
||||
|
||||
impl<'info, T: AccountSerialize + AccountDeserialize + Clone> ProgramAccount<'info, T> {
|
||||
pub fn account(&self) -> &T {
|
||||
&self.inner.account
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct Inner<'info, T: AccountSerialize + AccountDeserialize + Clone> {
|
||||
info: AccountInfo<'info>,
|
||||
|
|
Loading…
Reference in New Issue