mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Fix usage (#2775)
This commit is contained in:
committed by
GitHub
parent
0395b5dd16
commit
445f626c34
@@ -248,7 +248,7 @@ impl<
|
|||||||
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
||||||
let who = AccountIdConverter::from_location(who)
|
let who = AccountIdConverter::from_location(who)
|
||||||
.ok_or(Error::AccountIdConversionFailed)?;
|
.ok_or(Error::AccountIdConversionFailed)?;
|
||||||
Assets::deposit(asset_id, &who, amount)
|
Assets::mint_into(asset_id, &who, amount)
|
||||||
.map_err(|e| XcmError::FailedToTransactAsset(e.into()))
|
.map_err(|e| XcmError::FailedToTransactAsset(e.into()))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,7 +260,7 @@ impl<
|
|||||||
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
||||||
let who = AccountIdConverter::from_location(who)
|
let who = AccountIdConverter::from_location(who)
|
||||||
.ok_or(Error::AccountIdConversionFailed)?;
|
.ok_or(Error::AccountIdConversionFailed)?;
|
||||||
Assets::withdraw(asset_id, &who, amount)
|
Assets::burn_from(asset_id, &who, amount)
|
||||||
.map_err(|e| XcmError::FailedToTransactAsset(e.into()))?;
|
.map_err(|e| XcmError::FailedToTransactAsset(e.into()))?;
|
||||||
Ok(what.clone())
|
Ok(what.clone())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user