File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
token-lending/program/src/state Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ impl Reserve {
250
250
}
251
251
Ordering :: Less => {
252
252
let withdraw_pct = liquidation_value. try_div ( collateral. market_value ) ?;
253
- repay_amount = max_amount. try_floor_u64 ( ) ?;
253
+ repay_amount = max_amount. try_ceil_u64 ( ) ?;
254
254
withdraw_amount = Decimal :: from ( collateral. deposited_amount )
255
255
. try_mul ( withdraw_pct) ?
256
256
. try_floor_u64 ( ) ?;
@@ -282,7 +282,7 @@ impl Reserve {
282
282
Ordering :: Less => {
283
283
let withdraw_pct = liquidation_value. try_div ( collateral. market_value ) ?;
284
284
settle_amount = liquidation_amount;
285
- repay_amount = settle_amount. try_floor_u64 ( ) ?;
285
+ repay_amount = settle_amount. try_ceil_u64 ( ) ?;
286
286
withdraw_amount = Decimal :: from ( collateral. deposited_amount )
287
287
. try_mul ( withdraw_pct) ?
288
288
. try_floor_u64 ( ) ?;
You can’t perform that action at this time.
0 commit comments