mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +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>,
|
Assets: fungibles::Inspect<AccountId>,
|
||||||
{
|
{
|
||||||
fn contains(id: &<Assets as fungibles::Inspect<AccountId>>::AssetId) -> bool {
|
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>,
|
Assets: fungibles::Inspect<AccountId>,
|
||||||
{
|
{
|
||||||
fn contains(id: &<Assets as fungibles::Inspect<AccountId>>::AssetId) -> bool {
|
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>,
|
Assets: fungibles::Inspect<AccountId>,
|
||||||
{
|
{
|
||||||
fn contains(id: &<Assets as fungibles::Inspect<AccountId>>::AssetId) -> bool {
|
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
|
// Calculate how much we should charge in the asset_id for such amount of weight
|
||||||
// Require at least a payment of minimum_balance
|
// Require at least a payment of minimum_balance
|
||||||
// Necessary for fully collateral-backed assets
|
// 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| {
|
.map(|amount| {
|
||||||
let minimum_balance = ConcreteAssets::minimum_balance(local_asset_id);
|
let minimum_balance = ConcreteAssets::minimum_balance(local_asset_id);
|
||||||
if amount < minimum_balance {
|
if amount < minimum_balance {
|
||||||
@@ -206,7 +207,7 @@ impl<
|
|||||||
let (local_asset_id, outstanding_balance) =
|
let (local_asset_id, outstanding_balance) =
|
||||||
Matcher::matches_fungibles(&(id, fun).into()).ok()?;
|
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
|
// Calculate asset_balance
|
||||||
// This read should have already be cached in buy_weight
|
// This read should have already be cached in buy_weight
|
||||||
|
|||||||
Reference in New Issue
Block a user