Skip to content

Commit

Permalink
Add new signer type
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Jan 21, 2025
1 parent 8d71496 commit 1fb3ee9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tuktuk-program/src/write_return_tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub enum PayerInfo<'info> {
account_info: AccountInfo<'info>,
seeds: Vec<Vec<u8>>,
},
Signer(AccountInfo<'info>),
}

pub struct AccountWithSeeds<'info> {
Expand Down Expand Up @@ -152,6 +153,16 @@ where
rent_to_pay,
)?;
}
PayerInfo::Signer(account_info) => transfer(
CpiContext::new(
system_program.clone(),
Transfer {
from: account_info.clone(),
to: account.clone(),
},
),
rent_to_pay,
)?,
}
}

Expand Down

0 comments on commit 1fb3ee9

Please sign in to comment.