Skip to content

Commit

Permalink
add KAR to collaterals (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjj9219 authored Dec 6, 2021
1 parent 0622c2e commit f5afbf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions modules/emergency-shutdown/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ pub mod module {
refund_ratio.saturating_mul_int(<T as Config>::CDPTreasury::get_total_collaterals(currency_id));

if !refund_amount.is_zero() {
<T as Config>::CDPTreasury::withdraw_collateral(&who, currency_id, refund_amount)?;
refund_assets.push((currency_id, refund_amount));
let res = <T as Config>::CDPTreasury::withdraw_collateral(&who, currency_id, refund_amount);
if res.is_ok() {
refund_assets.push((currency_id, refund_amount));
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/karura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ where
}

parameter_types! {
pub CollateralCurrencyIds: Vec<CurrencyId> = vec![KSM, LKSM];
pub CollateralCurrencyIds: Vec<CurrencyId> = vec![KSM, LKSM, KAR];
pub DefaultLiquidationRatio: Ratio = Ratio::saturating_from_rational(150, 100);
pub DefaultDebitExchangeRate: ExchangeRate = ExchangeRate::saturating_from_rational(1, 10);
pub DefaultLiquidationPenalty: Rate = Rate::saturating_from_rational(8, 100);
Expand Down

0 comments on commit f5afbf4

Please sign in to comment.