Skip to content

Commit f1bc28a

Browse files
change to authoriry origin
1 parent f8255c1 commit f1bc28a

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pallets/stableswap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pallet-stableswap"
3-
version = "5.3.1"
3+
version = "5.4.0"
44
description = "AMM for correlated assets"
55
authors = ["GalacticCouncil"]
66
edition = "2021"

pallets/stableswap/src/benchmarks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ benchmarks! {
412412
update_asset_peg_source{
413413
let lp_provider: T::AccountId = account("provider", 0, 1);
414414
let (pool_id, pool) = setup_pool_with_initial_liquidity::<T>(&lp_provider);
415-
let successful_origin = T::UpdateTradabilityOrigin::try_successful_origin().unwrap();
415+
let successful_origin = T::AuthorityOrigin::try_successful_origin().unwrap();
416416

417417
// Get first asset from pool
418418
let asset_id = *pool.assets.first().unwrap();
@@ -430,7 +430,7 @@ benchmarks! {
430430
update_pool_max_peg_update{
431431
let lp_provider: T::AccountId = account("provider", 0, 1);
432432
let (pool_id, _pool) = setup_pool_with_initial_liquidity::<T>(&lp_provider);
433-
let successful_origin = T::UpdateTradabilityOrigin::try_successful_origin().unwrap();
433+
let successful_origin = T::AuthorityOrigin::try_successful_origin().unwrap();
434434

435435
let new_max_peg_update = Permill::from_percent(50);
436436

pallets/stableswap/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ pub mod pallet {
12721272
/// The current price is always preserved when updating the peg source.
12731273
///
12741274
/// Parameters:
1275-
/// - `origin`: Must be `T::UpdateTradabilityOrigin`.
1275+
/// - `origin`: Must be `T::AuthorityOrigin`.
12761276
/// - `pool_id`: The ID of the pool containing the asset.
12771277
/// - `asset_id`: The ID of the asset whose peg source is to be updated.
12781278
/// - `peg_source`: The new peg source for the asset.
@@ -1293,7 +1293,7 @@ pub mod pallet {
12931293
asset_id: T::AssetId,
12941294
peg_source: PegSource<T::AssetId>,
12951295
) -> DispatchResult {
1296-
T::UpdateTradabilityOrigin::ensure_origin(origin)?;
1296+
T::AuthorityOrigin::ensure_origin(origin)?;
12971297

12981298
let pool = Pools::<T>::get(pool_id).ok_or(Error::<T>::PoolNotFound)?;
12991299
let asset_index = pool.find_asset(asset_id).ok_or(Error::<T>::AssetNotInPool)?;
@@ -1322,7 +1322,7 @@ pub mod pallet {
13221322
/// can change in a pool with pegs configured.
13231323
///
13241324
/// Parameters:
1325-
/// - `origin`: Must be `T::UpdateTradabilityOrigin`.
1325+
/// - `origin`: Must be `T::AuthorityOrigin`.
13261326
/// - `pool_id`: The ID of the pool to update.
13271327
/// - `max_peg_update`: The new maximum peg update percentage.
13281328
///
@@ -1340,7 +1340,7 @@ pub mod pallet {
13401340
pool_id: T::AssetId,
13411341
max_peg_update: Permill,
13421342
) -> DispatchResult {
1343-
T::UpdateTradabilityOrigin::ensure_origin(origin)?;
1343+
T::AuthorityOrigin::ensure_origin(origin)?;
13441344

13451345
let _pool = Pools::<T>::get(pool_id).ok_or(Error::<T>::PoolNotFound)?;
13461346

pallets/stableswap/src/tests/update_max_peg_update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ fn update_pool_max_peg_update_should_fail_when_invalid_origin() {
155155

156156
let new_max_peg_update = Permill::from_percent(25);
157157

158-
// BOB doesn't have UpdateTradabilityOrigin permission
158+
// BOB doesn't have AuthorityOrigin permission
159159
assert_noop!(
160160
Stableswap::update_pool_max_peg_update(RuntimeOrigin::signed(BOB), pool_id, new_max_peg_update,),
161161
sp_runtime::DispatchError::BadOrigin

pallets/stableswap/src/tests/update_peg_source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ fn update_asset_peg_source_should_fail_when_invalid_origin() {
277277

278278
let new_peg_source = PegSource::Value((2, 3));
279279

280-
// BOB doesn't have UpdateTradabilityOrigin permission
280+
// BOB doesn't have AuthorityOrigin permission
281281
assert_noop!(
282282
Stableswap::update_asset_peg_source(RuntimeOrigin::signed(BOB), pool_id, asset_a, new_peg_source,),
283283
sp_runtime::DispatchError::BadOrigin

0 commit comments

Comments
 (0)