This commit is contained in:
Hardhat Chad
2025-10-09 08:51:13 -07:00
parent 44f4021834
commit 7f98f16512
9 changed files with 15 additions and 27 deletions

View File

@@ -3,8 +3,6 @@ use solana_program::log::sol_log;
use spl_token::amount_to_ui_amount;
use steel::*;
use crate::AUTHORIZED_ACCOUNTS;
/// Deposits ORE into the staking contract.
pub fn process_deposit(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult {
// Parse data.
@@ -30,11 +28,6 @@ pub fn process_deposit(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResu
system_program.is_program(&system_program::ID)?;
token_program.is_program(&spl_token::ID)?;
// Check whitelist
if !AUTHORIZED_ACCOUNTS.contains(&signer_info.key) {
return Err(trace("Not authorized", OreError::NotAuthorized.into()));
}
// Open stake account.
let stake = if stake_info.data_is_empty() {
create_program_account::<Stake>(