From 91224f38cd0b8523c9316fdd1398ce0233417b64 Mon Sep 17 00:00:00 2001 From: code0xff Date: Fri, 13 Sep 2024 22:24:38 +0900 Subject: [PATCH] refactor: Remove pallet-cosmos::Config cast --- frame/cosmos/src/mock.rs | 2 +- template/runtime/src/assets.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/cosmos/src/mock.rs b/frame/cosmos/src/mock.rs index edf9784..414c7f2 100644 --- a/frame/cosmos/src/mock.rs +++ b/frame/cosmos/src/mock.rs @@ -285,7 +285,7 @@ impl pallet_cosmwasm::Config for Test { type ExecuteWasmOrigin = frame_system::EnsureSigned; type NativeAssetId = NativeAssetId; - + type NativeDenom = NativeDenom; } diff --git a/template/runtime/src/assets.rs b/template/runtime/src/assets.rs index c06477c..4dc2094 100644 --- a/template/runtime/src/assets.rs +++ b/template/runtime/src/assets.rs @@ -27,7 +27,7 @@ where T: pallet_cosmos::Config, { fn created(id: &T::AssetId, _owner: &T::AccountId) -> Result<(), ()> { - let symbol = ::Assets::symbol(id.clone()); + let symbol = T::Assets::symbol(id.clone()); ensure!(!symbol.is_empty(), ()); let denom = BoundedVec::::try_from(symbol).map_err(|_| ())?;