Skip to content

Commit

Permalink
Recalculate the price when unbond
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitys7 committed Aug 23, 2024
1 parent f7993df commit aba6c2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/consumer/converter/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ impl ConverterApi for ConverterContract<'_> {
.add_attribute("owner", delegator.clone());

let channel = IBC_CHANNEL.load(ctx.deps.storage)?;

// Recalculate the price when unbond
let amount = self.invert_price(ctx.deps.as_ref(), amount)?;
let packet = ConsumerPacket::InternalUnstake {
delegator,
validator,
Expand Down

0 comments on commit aba6c2a

Please sign in to comment.