Skip to content

Commit

Permalink
fix: send back remaining amount after enforced penalty
Browse files Browse the repository at this point in the history
Refs: #1
  • Loading branch information
bucurdavid committed Mar 14, 2024
1 parent 7e18191 commit b6d849a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub trait LifeBondingContract:
.compensations_ids()
.get_id_non_zero((token_identifier, nonce));

let mut bond_cache = BondCache::new(self, bond_id);
let bond_cache = BondCache::new(self, bond_id);

let current_timestamp = self.blockchain().get_block_timestamp();

Expand Down Expand Up @@ -183,7 +183,7 @@ pub trait LifeBondingContract:
&caller,
&self.bond_payment_token().get(),
0u64,
&bond_cache.bond_amount,
&bond_cache.remaining_amount,
);
// clear compensations as the entire bond is withdrawn
// compensation_cache.clear();
Expand Down

0 comments on commit b6d849a

Please sign in to comment.