mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Do not assume AssetIds are Copy (companion for substrate#14158) (#2586)
* Do not assume `AssetId`s are `Copy`
* update lockfile for {"substrate", "polkadot"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+193
-193
File diff suppressed because it is too large
Load Diff
@@ -91,7 +91,7 @@ where
|
||||
Assets: fungibles::Inspect<AccountId>,
|
||||
{
|
||||
fn contains(id: &<Assets as fungibles::Inspect<AccountId>>::AssetId) -> bool {
|
||||
!Assets::total_issuance(*id).is_zero()
|
||||
!Assets::total_issuance(id.clone()).is_zero()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ where
|
||||
Assets: fungibles::Inspect<AccountId>,
|
||||
{
|
||||
fn contains(id: &<Assets as fungibles::Inspect<AccountId>>::AssetId) -> bool {
|
||||
Assets::asset_exists(*id)
|
||||
Assets::asset_exists(id.clone())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ where
|
||||
Assets: fungibles::Inspect<AccountId>,
|
||||
{
|
||||
fn contains(id: &<Assets as fungibles::Inspect<AccountId>>::AssetId) -> bool {
|
||||
!Assets::total_issuance(*id).is_zero()
|
||||
!Assets::total_issuance(id.clone()).is_zero()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,8 @@ impl<
|
||||
// Calculate how much we should charge in the asset_id for such amount of weight
|
||||
// Require at least a payment of minimum_balance
|
||||
// Necessary for fully collateral-backed assets
|
||||
let asset_balance: u128 = FeeCharger::charge_weight_in_fungibles(local_asset_id, weight)
|
||||
let asset_balance: u128 =
|
||||
FeeCharger::charge_weight_in_fungibles(local_asset_id.clone(), weight)
|
||||
.map(|amount| {
|
||||
let minimum_balance = ConcreteAssets::minimum_balance(local_asset_id);
|
||||
if amount < minimum_balance {
|
||||
@@ -206,7 +207,7 @@ impl<
|
||||
let (local_asset_id, outstanding_balance) =
|
||||
Matcher::matches_fungibles(&(id, fun).into()).ok()?;
|
||||
|
||||
let minimum_balance = ConcreteAssets::minimum_balance(local_asset_id);
|
||||
let minimum_balance = ConcreteAssets::minimum_balance(local_asset_id.clone());
|
||||
|
||||
// Calculate asset_balance
|
||||
// This read should have already be cached in buy_weight
|
||||
|
||||
Reference in New Issue
Block a user