Skip to content

Commit

Permalink
Demote on-chain account balance mismatch to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Mar 26, 2024
1 parent f6c90d2 commit 52a0451
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3007,13 +3007,11 @@ async fn process_account_sweep<T: Signers>(

let (mut instructions, sweep_amount) = if token.is_sol() {
if from_account.lamports < from_tracked_account.last_update_balance {
return Err(format!(
"{}: On-chain account balance ({}) less than tracked balance ({})",
println!("Warning: {}: On-chain account balance ({}) less than tracked balance ({})",
from_address,
token.ui_amount(from_account.lamports),
token.ui_amount(from_tracked_account.last_update_balance)
)
.into());
);
}

if from_account.owner == system_program::id() {
Expand Down

0 comments on commit 52a0451

Please sign in to comment.