Skip to content

Commit

Permalink
use if let with tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
gianfra-t committed Dec 19, 2023
1 parent 6db2cb9 commit 7967cbf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions runtime/common/src/custom_transactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ impl<
>
{
fn deposit_asset(asset: &MultiAsset, location: &MultiLocation, _context: &XcmContext) -> Result {
if let Some(amount_deposited) = AutomationPalletConfigT::matches_asset(asset){

if let (Some(amount_deposited), Some((length, data))) =
(AutomationPalletConfigT::matches_asset(asset), AutomationPalletConfigT::matches_beneficiary(location)) {
AutomationPalletConfigT::callback(length, data, amount_deposited);
return Ok(());
}

if let Some((length,data)) = AutomationPalletConfigT::matches_beneficiary(location){
AutomationPalletConfigT::callback(length, data, amount_deposited);
return Ok(());
}
}
match (
AccountIdConvert::convert_ref(location),
CurrencyIdConvert::convert(asset.clone()),
Expand Down

0 comments on commit 7967cbf

Please sign in to comment.