Skip to content

Commit 74d3ac3

Browse files
committed
steel bumped to 2.1.0
1 parent 77a3538 commit 74d3ac3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use crate::ACCOUNT;
2+
use checking_account_api::ID;
13
use solana_program::{
24
account_info::AccountInfo,
35
msg,
@@ -16,10 +18,14 @@ pub fn process_accounts(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramRe
1618
// verify that first one is a signer
1719
signer_info.is_signer()?;
1820

19-
// new account needs to be
20-
// 1. empty
21-
// 2. writable
22-
new_account_info.is_empty()?.is_writable()?;
21+
// new account needs to
22+
// 1. be empty
23+
// 2. be writable
24+
// 3. has seeds
25+
new_account_info.is_empty()?.is_writable()?.has_seeds(
26+
&[ACCOUNT],
27+
&ID
28+
)?;
2329

2430
// verify program ID from the instruction
2531
system_program.is_program(&system_program::ID)?;

0 commit comments

Comments
 (0)