Skip to content

Conversation

@acatangiu
Copy link
Contributor

Fixed some broken and ignored XCM tests.

  • Does not require a CHANGELOG entry

@acatangiu acatangiu self-assigned this Nov 11, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a logic error due to swapped function arguments in two test files, which will likely cause the tests to fail. Also identified duplicated test logic that could be refactored.

/// - Parachain should be able to create a new Foreign Asset at Asset Hub
#[test]
fn send_xcm_from_para_to_asset_hub_paying_fee_with_system_asset() {
pub fn penpal_register_foreign_asset_on_asset_hub(asset_location_on_penpal: Location) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function penpal_register_foreign_asset_on_asset_hub is nearly identical to the one added in integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/send.rs. Consider moving this logic to a shared helper to avoid code duplication.

Comment on lines +222 to +225
let call = AssetHubKusama::create_foreign_asset_call(
foreign_asset_at_asset_hub.clone(),
ASSET_MIN_BALANCE,
para_sovereign_account,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The owner and min_balance arguments for create_foreign_asset_call appear to be swapped. ASSET_MIN_BALANCE is being passed as the owner, and para_sovereign_account is passed as the minimum balance. This will lead to a runtime error or incorrect behavior. They should be swapped to match the expected signature (id, owner, min_balance).

Comment on lines +229 to +232
let call = AssetHubPolkadot::create_foreign_asset_call(
foreign_asset_at_asset_hub.clone(),
ASSET_MIN_BALANCE,
para_sovereign_account,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The owner and min_balance arguments for create_foreign_asset_call appear to be swapped. ASSET_MIN_BALANCE is being passed as the owner, and para_sovereign_account is passed as the minimum balance. This will lead to a runtime error or incorrect behavior. They should be swapped to match the expected signature (id, owner, min_balance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants