Skip to content

Commit 77a3538

Browse files
committed
cleanup
1 parent c9f2c05 commit 77a3538

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

basics/checking-accounts/steel/program/src/initialize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use solana_program::{
66
use steel::*;
77

88

9-
pub fn process_initialize_account(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResult {
9+
pub fn process_accounts(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResult {
1010

1111
// unpack 3 accounts exactly or throw an error
1212
let [signer_info, new_account_info, system_program] = accounts else {

basics/checking-accounts/steel/program/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn process_instruction(
1212
let (ix, data) = parse_instruction(&checking_account_api::ID, program_id, data)?;
1313

1414
match ix {
15-
AccountInstruction::InitializeAccount => process_initialize_account(accounts, data)?,
15+
AccountInstruction::InitializeAccount => process_accounts(accounts, data)?,
1616
}
1717

1818
Ok(())

basics/checking-accounts/steel/tests/checking.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum Discriminator {
2323
INIT = 0,
2424
}
2525

26-
describe("account data program", () => {
26+
describe("checking account program", () => {
2727
let context: ProgramTestContext;
2828
let client: BanksClient;
2929
let payer: Keypair;
@@ -48,17 +48,12 @@ describe("account data program", () => {
4848
return new TextDecoder().decode(array).replace(/\0+$/, "");
4949
};
5050

51-
it("initialize account data", async () => {
51+
it("process", async () => {
5252
const [accountPDA] = PublicKey.findProgramAddressSync(
5353
[Buffer.from(ACCOUNT_SEED)],
5454
PROGRAM_ID,
5555
);
5656

57-
const name = "John Doe";
58-
const house_number = 3;
59-
const city = "Anytown";
60-
const street = "Main St";
61-
6257
const instructionData = createInitializeInstructionData();
6358

6459
const initializeIx = new TransactionInstruction({

0 commit comments

Comments
 (0)