From 787aeffe7899f86e4e01456ec35b7c07013df375 Mon Sep 17 00:00:00 2001 From: lukacan Date: Fri, 12 Jan 2024 20:01:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20fix=20inconsistency=20inside=20r?= =?UTF-8?q?eadme=20of=20example3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/fuzz_example3/README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/examples/fuzz_example3/README.md b/examples/fuzz_example3/README.md index b38f2597..f96c7420 100644 --- a/examples/fuzz_example3/README.md +++ b/examples/fuzz_example3/README.md @@ -87,19 +87,15 @@ if let Some(escrow) = pre_ix.escrow { } else if recepient_token_account_pre.amount + escrow.amount != recepient_token_account_post.amount { if recepient_token_account_pre.amount + escrow.amount > recepient_token_account_post.amount { - - eprintln!("Amount Mismatch (Recipient withdrew LESS) by: {}", (recepient_token_account_pre.amount + escrow.amount) - recepient_token_account_post.amount); - + return Err("Recipient withdrew LESS"); } else { - eprintln!("Amount Mismatch (Recipient withdrew MORE) by: {}", recepient_token_account_post.amount - (recepient_token_account_pre.amount + escrow.amount)); + // print info within debug mode + // eprintln!("Before: {}", recepient_token_account_pre.amount); + return Err("Recipient withdrew MORE"); - } - eprintln!("Before: {}", recepient_token_account_pre.amount); - eprintln!("After: {}", recepient_token_account_post.amount); - eprintln!("Expected: {}", recepient_token_account_pre.amount + escrow.amount); - return Err("Transferred amount mismatch"); + } } } }