Skip to content

Commit

Permalink
Achieve technical completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitish-bot committed Nov 24, 2024
1 parent d9e8715 commit 20b8d91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion basics/pda-rent-payer/steel/api/src/instruction.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use borsh::{ BorshDeserialize, BorshSerialize };
use borsh::{BorshDeserialize, BorshSerialize};
use steel::*;

#[repr(u8)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn process_create_account(accounts: &[AccountInfo<'_>]) -> ProgramResult {
// First we get the lamports required for rent
// assuming this account has no inner data
let lamports_required_for_rent = (Rent::get()?).minimum_balance(0);

if vault_balance < lamports_required_for_rent {
return Err(ProgramError::InsufficientFunds);
}
Expand Down
2 changes: 1 addition & 1 deletion basics/pda-rent-payer/steel/program/src/init_rent_vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn process_initialize_vault(accounts: &[AccountInfo<'_>], data: &[u8]) -> Pr

match transfer {
Ok(_) => (),
Err(e) => return Err(e.into()),
Err(e) => return Err(e),
}

msg!("Initialized rent vault.");
Expand Down

0 comments on commit 20b8d91

Please sign in to comment.