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;
/// Withdraws ORE from the staking contract.
pub fn process_withdraw(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult {
// Parse data.
@@ -34,11 +32,6 @@ pub fn process_withdraw(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRes
token_program.is_program(&spl_token::ID)?;
associated_token_program.is_program(&spl_associated_token_account::ID)?;
// Check whitelist
if !AUTHORIZED_ACCOUNTS.contains(&signer_info.key) {
return Err(trace("Not authorized", OreError::NotAuthorized.into()));
}
// Open recipient token account.
if recipient_info.data_is_empty() {
create_associated_token_account(