Skip to content

Address review comments: remove unused deps, fix imbalance handling, update comments#554

Merged
ebma merged 3 commits intoallow-native-token-teleport-to-assethubfrom
copilot/sub-pr-553
Feb 27, 2026
Merged

Address review comments: remove unused deps, fix imbalance handling, update comments#554
ebma merged 3 commits intoallow-native-token-teleport-to-assethubfrom
copilot/sub-pr-553

Conversation

Copy link

Copilot AI commented Feb 27, 2026

Addresses unresolved review comments from PR #553:

Changes

  • Removed unused staging-xcm-executor dependency from pallets/xcm-teleport/Cargo.toml and all feature lists (std, runtime-benchmarks) — not referenced in code

  • Fixed critical security issue in teleport_native_to_asset_hub: Previously burned tokens immediately before XCM validation/delivery, causing permanent fund loss on routing failures. Now:

    • Keeps imbalance alive through validation and delivery
    • Only burns after successful delivery via drop(imbalance)
    • Refunds to sender via T::Currency::resolve_creating() on validation or delivery errors
  • Updated comment in runtime/pendulum/src/xcm_config.rs:338 from "Teleporting is disabled" to accurately reflect restriction via TrustedTeleporters

  • Removed unused import use sp_std::vec; from pallet

Limitation

The refund mechanism only covers local routing failures. If the XCM message is successfully delivered but fails during execution on AssetHub, tokens remain burned (remote execution failures are not detectable at send time).


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 27, 2026 09:38
…lance properly

Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>
Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable teleport of native token to Assethub Address review comments: remove unused deps, fix imbalance handling, update comments Feb 27, 2026
@ebma ebma marked this pull request as ready for review February 27, 2026 09:50
@ebma ebma merged commit 7bac432 into allow-native-token-teleport-to-assethub Feb 27, 2026
@ebma ebma deleted the copilot/sub-pr-553 branch February 27, 2026 09:51
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.

2 participants