Skip to content

Commit 2b0a5f6

Browse files
committed
fix comments
1 parent 9479d89 commit 2b0a5f6

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pallets/swap/src/pallet/impls.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,6 @@ impl<T: Config> Pallet<T> {
12801280

12811281
// 2) Convert ALL α withdrawn (principal + fees) to τ and refund τ to user.
12821282
if alpha_total_from_pool > AlphaCurrency::ZERO {
1283-
// α → τ via AMM swap (sell α). Drop trading fees on forced dissolve.
12841283
let sell_amount: u64 = alpha_total_from_pool.into();
12851284

12861285
if let Some(limit_sqrt_price) = compute_limit() {
@@ -1293,7 +1292,6 @@ impl<T: Config> Pallet<T> {
12931292
false,
12941293
) {
12951294
Ok(sres) => {
1296-
// Credit τ output to the user.
12971295
let tao_out: TaoCurrency = sres.amount_paid_out.into();
12981296
if tao_out > TaoCurrency::ZERO {
12991297
T::BalanceOps::increase_balance(&owner, tao_out);
@@ -1302,8 +1300,6 @@ impl<T: Config> Pallet<T> {
13021300
}
13031301
}
13041302
Err(e) => {
1305-
// Could not convert α -> τ; log and continue dissolving others.
1306-
// (No α is credited to the user; α already removed from pool is effectively burned.)
13071303
log::debug!(
13081304
"dissolve_all_lp: α→τ swap failed on dissolve: netuid={:?}, owner={:?}, pos_id={:?}, α={:?}, err={:?}",
13091305
netuid,
@@ -1324,7 +1320,6 @@ impl<T: Config> Pallet<T> {
13241320
);
13251321
}
13261322

1327-
// Provided‑α reserve (user‑provided liquidity) decreased by what left the pool.
13281323
T::BalanceOps::decrease_provided_alpha_reserve(
13291324
netuid,
13301325
alpha_total_from_pool,
@@ -1344,7 +1339,6 @@ impl<T: Config> Pallet<T> {
13441339
}
13451340
}
13461341
Err(e) => {
1347-
// Keep dissolving other positions even if this one fails.
13481342
log::debug!(
13491343
"dissolve_all_lp: force-close failed: netuid={:?}, owner={:?}, pos_id={:?}, err={:?}",
13501344
netuid,

0 commit comments

Comments
 (0)