Skip to content

Commit

Permalink
fix: change check to governance (#933)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated origin verification to utilize
`T::GovernanceOrigin::ensure_origin` for enhanced control flow and
security.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
Gauthamastro authored Mar 21, 2024
2 parents 154fdd7 + 955d78d commit c057bf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pallets/thea-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ pub mod pallet {
asset_id: u128,
decimal: u8,
) -> DispatchResult {
ensure_root(origin)?;
T::GovernanceOrigin::ensure_origin(origin)?;
let metadata = AssetMetadata::new(decimal).ok_or(Error::<T>::InvalidDecimal)?;
<Metadata<T>>::insert(asset_id, metadata);
Self::deposit_event(Event::<T>::AssetMetadataSet(metadata));
Expand Down
2 changes: 1 addition & 1 deletion runtimes/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// and set impl_version to 0. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 335,
spec_version: 336,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down

0 comments on commit c057bf8

Please sign in to comment.