Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
muharem and bkchr authored Jun 7, 2024
1 parent 193e5bd commit dd50dd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ parameter_types! {
// https://github.com/paritytech/substrate/blob/069917b/frame/assets/src/lib.rs#L257L271
pub const MetadataDepositBase: Balance = system_para_deposit(1, 68);
pub const MetadataDepositPerByte: Balance = system_para_deposit(0, 1);
/// The asset ID's auto increment for trusted assets planned with the next release.
pub const TrustAssetIdAutoIncrement: AssetIdForTrustBackedAssets = 50_000_000;
}

/// We allow root to execute privileged asset operations.
Expand All @@ -296,7 +294,7 @@ impl EnsureOriginWithArg<RuntimeOrigin, AssetIdForTrustBackedAssets>
o: RuntimeOrigin,
a: &AssetIdForTrustBackedAssets,
) -> Result<Self::Success, RuntimeOrigin> {
if a >= &TrustAssetIdAutoIncrement::get() {
if *a >= 50_000_000 {
return Err(o);
}
<EnsureSigned<AccountId> as EnsureOrigin<RuntimeOrigin>>::try_origin(o)
Expand Down
4 changes: 1 addition & 3 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ parameter_types! {
// https://github.com/paritytech/substrate/blob/069917b/frame/assets/src/lib.rs#L257L271
pub const MetadataDepositBase: Balance = system_para_deposit(1, 68);
pub const MetadataDepositPerByte: Balance = system_para_deposit(0, 1);
/// The asset ID's auto increment for trusted assets planned with the next release.
pub const TrustAssetIdAutoIncrement: AssetIdForTrustBackedAssets = 50_000_000;
}

/// We allow root to execute privileged asset operations.
Expand All @@ -314,7 +312,7 @@ impl EnsureOriginWithArg<RuntimeOrigin, AssetIdForTrustBackedAssets>
o: RuntimeOrigin,
a: &AssetIdForTrustBackedAssets,
) -> Result<Self::Success, RuntimeOrigin> {
if a >= &TrustAssetIdAutoIncrement::get() {
if *a >= 50_000_000 {
return Err(o);
}
<EnsureSigned<AccountId> as EnsureOrigin<RuntimeOrigin>>::try_origin(o)
Expand Down

0 comments on commit dd50dd8

Please sign in to comment.