Skip to content

Commit

Permalink
Fix staking contract
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Sep 28, 2023
1 parent 9a812b8 commit 19ea2b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/staking/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub fn unbond(deps: DepsMut, env: Env, info: MessageInfo, amount: Uint128) -> St
let owner_raw = deps.api.addr_canonicalize(invest.owner.as_str())?;

// calculate tax and remainer to unbond
let tax = amount * invest.exit_tax;
let tax = amount.mul_floor(invest.exit_tax);

// deduct all from the account
let balance = may_load_map(deps.storage, PREFIX_BALANCE, &sender_raw)?.unwrap_or_default();
Expand Down

0 comments on commit 19ea2b6

Please sign in to comment.