Skip to content

Commit 52a0451

Browse files
committedMar 26, 2024·
Demote on-chain account balance mismatch to warning
1 parent f6c90d2 commit 52a0451

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎src/main.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -3007,13 +3007,11 @@ async fn process_account_sweep<T: Signers>(
30073007

30083008
let (mut instructions, sweep_amount) = if token.is_sol() {
30093009
if from_account.lamports < from_tracked_account.last_update_balance {
3010-
return Err(format!(
3011-
"{}: On-chain account balance ({}) less than tracked balance ({})",
3010+
println!("Warning: {}: On-chain account balance ({}) less than tracked balance ({})",
30123011
from_address,
30133012
token.ui_amount(from_account.lamports),
30143013
token.ui_amount(from_tracked_account.last_update_balance)
3015-
)
3016-
.into());
3014+
);
30173015
}
30183016

30193017
if from_account.owner == system_program::id() {

0 commit comments

Comments
 (0)
Please sign in to comment.