From fc7803f738a937b45ebffda8c184ef299de75eff Mon Sep 17 00:00:00 2001 From: Bucur David Date: Thu, 4 Apr 2024 12:01:42 +0300 Subject: [PATCH] fix: forfeit logic --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7325504..47cb54c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -164,8 +164,7 @@ pub trait LifeBondingContract: ERR_PENALTIES_EXCEED_WITHDRAWAL_AMOUNT ); require!( - &bond_cache.remaining_amount - &penalty_amount - >= compensation_cache.accumulated_amount, + &bond_cache.bond_amount - &penalty_amount >= compensation_cache.accumulated_amount, ERR_PENALTIES_EXCEED_WITHDRAWAL_AMOUNT );