diff --git a/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs b/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs index 217ef1959..83e1f49a3 100644 --- a/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs +++ b/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs @@ -26,12 +26,12 @@ impl Pallet { // transfer new amount to target let amount_as_balance = BalanceOf::::saturated_from(new_amount); - T::Currency::deposit_creating(&tx.target, amount_as_balance); + let _ = T::Currency::deposit_creating(&tx.target, amount_as_balance); // transfer deposit fee to fee wallet let deposit_fee_b = BalanceOf::::saturated_from(deposit_fee); if let Some(fee_account) = FeeAccount::::get() { - T::Currency::deposit_creating(&fee_account, deposit_fee_b); + let _ = T::Currency::deposit_creating(&fee_account, deposit_fee_b); } // Remove tx from storage @@ -78,7 +78,7 @@ impl Pallet { // transfer withdraw fee to fee wallet if let Some(fee_account) = FeeAccount::::get() { - T::Currency::deposit_creating(&fee_account, withdraw_fee_b); + let _ = T::Currency::deposit_creating(&fee_account, withdraw_fee_b); } // increment burn transaction id @@ -240,9 +240,11 @@ impl Pallet { Error::::BurnTransactionAlreadyExecuted ); - let Some(mut burn_tx) = BurnTransactions::::get(tx_id) else {return Err(DispatchErrorWithPostInfo::from( - Error::::BurnTransactionNotExists, - ));}; + let Some(mut burn_tx) = BurnTransactions::::get(tx_id) else { + return Err(DispatchErrorWithPostInfo::from( + Error::::BurnTransactionNotExists, + )); + }; ensure!( BurnTransactions::::contains_key(tx_id), @@ -286,9 +288,11 @@ impl Pallet { stellar_pub_key: Vec, sequence_number: u64, ) -> DispatchResultWithPostInfo { - let Some(mut tx) = BurnTransactions::::get(&tx_id) else {return Err(DispatchErrorWithPostInfo::from( - Error::::BurnTransactionNotExists, - ));}; + let Some(mut tx) = BurnTransactions::::get(&tx_id) else { + return Err(DispatchErrorWithPostInfo::from( + Error::::BurnTransactionNotExists, + )); + }; let validators = Validators::::get(); if tx.signatures.len() == (validators.len() / 2) + 1 { @@ -346,9 +350,11 @@ impl Pallet { Error::::BurnTransactionNotExists ); - let Some(tx) = BurnTransactions::::get(tx_id) else {return Err(DispatchErrorWithPostInfo::from( - Error::::BurnTransactionNotExists, - ));}; + let Some(tx) = BurnTransactions::::get(tx_id) else { + return Err(DispatchErrorWithPostInfo::from( + Error::::BurnTransactionNotExists, + )); + }; BurnTransactions::::remove(tx_id); ExecutedBurnTransactions::::insert(tx_id, &tx);