Skip to content

Commit

Permalink
apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthDesai committed Mar 27, 2024
1 parent 9721324 commit c391adb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions container-chains/templates/frontier/runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ impl pallet_assets::Config<ForeignAssetsInstance> for Runtime {
type BenchmarkHelper = ForeignAssetBenchmarkHelper;
}

pub struct DummyPrecompileHook;
pub struct RevertCodePrecompileHook;

impl ForeignAssetCreatedHook<MultiLocation, AssetIdOf<Runtime>, AssetBalance<Runtime>>
for DummyPrecompileHook
for RevertCodePrecompileHook
{
fn on_asset_created(
_foreign_asset: &MultiLocation,
Expand All @@ -397,7 +397,7 @@ impl ForeignAssetCreatedHook<MultiLocation, AssetIdOf<Runtime>, AssetBalance<Run
}
}

impl ForeignAssetDestroyedHook<MultiLocation, AssetIdOf<Runtime>> for DummyPrecompileHook {
impl ForeignAssetDestroyedHook<MultiLocation, AssetIdOf<Runtime>> for RevertCodePrecompileHook {
fn on_asset_destroyed(_foreign_asset: &MultiLocation, asset_id: &AssetIdOf<Runtime>) {
let prefix_slice = [255u8; 18];
let account_id = Runtime::asset_id_to_account(prefix_slice.as_slice(), *asset_id);
Expand All @@ -414,8 +414,8 @@ impl pallet_foreign_asset_creator::Config for Runtime {
type ForeignAssetDestroyerOrigin = EnsureRoot<AccountId>;
type Fungibles = ForeignAssets;
type WeightInfo = pallet_foreign_asset_creator::weights::SubstrateWeight<Runtime>;
type OnForeignAssetCreated = DummyPrecompileHook;
type OnForeignAssetDestroyed = DummyPrecompileHook;
type OnForeignAssetCreated = RevertCodePrecompileHook;
type OnForeignAssetDestroyed = RevertCodePrecompileHook;
}

impl pallet_asset_rate::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describeSuite({
testCases: ({ context, it }) => {
it({
id: "T01",
title: "dummy precompile address is created when",
title: "dummy precompile address is created when creating the asset and removed when destroyed",
test: async function () {
const assetId = 5;
const assetIdAddress = new Uint8Array([
Expand Down

0 comments on commit c391adb

Please sign in to comment.