Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed sudo access from Asset allowlisting ext #922

Merged
merged 4 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtimes/parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ impl pallet_sudo::Config for Runtime {

parameter_types! {
pub const AssetHandlerPalletId: PalletId = PalletId(*b"XcmHandl");
pub const WithdrawalExecutionBlockDiff: u32 = 1000;
pub const WithdrawalExecutionBlockDiff: u32 = 1;
pub ParachainId: u32 = ParachainInfo::get().into();
pub const ParachainNetworkId: u8 = 1; // Our parachain's thea id is one.
pub const PolkadexAssetid: u128 = POLKADEX_NATIVE_ASSET_ID;
Expand Down
14 changes: 8 additions & 6 deletions runtimes/parachain/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,14 @@ where
let foreign_currency_asset_id =
AC::convert_location_to_asset_id(location).ok_or(XcmError::Trap(1001))?;
let _path = [PolkadexAssetid::get(), foreign_currency_asset_id];
let (unused, expected_fee_in_foreign_currency) =
if WH::check_whitelisted_token(foreign_currency_asset_id) {
(payment, 0u128)
} else {
return Err(XcmError::Trap(1004));
};
//WILL BE RESTORED LATER
// let (unused, expected_fee_in_foreign_currency) =
// if WH::check_whitelisted_token(foreign_currency_asset_id) {
// (payment, 0u128)
// } else {
// return Err(XcmError::Trap(1004));
// };
let (unused, expected_fee_in_foreign_currency) = (payment, 0u128);
self.weight = self.weight.saturating_add(weight);
if let Some((old_asset_location, _)) = self.asset_location_and_units_per_second {
if old_asset_location == location {
Expand Down
Loading