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

FungibleAdapter: change active_issuance on teleport #8060

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

franciscoaguirre
Copy link
Contributor

The FungibleAdapter was missing deactivating balance when it was teleported away and reactivating it when it was teleported back into.

Fixes #8055.

@@ -96,11 +96,13 @@ impl<

fn accrue_checked(checking_account: AccountId, amount: Fungible::Balance) {
let ok = Fungible::mint_into(&checking_account, amount).is_ok();
<Fungible as fungible::Unbalanced<_>>::deactivate(amount);
Copy link
Contributor

Choose a reason for hiding this comment

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

In case we go with this fix, we should probably consider a migration/correction for InactiveIssuance, right? - see the comment: #8055 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking the same, the fix corrects from the point that we deploy it but leaves us with an inconsistent state due to what happened in between

Copy link
Contributor

Choose a reason for hiding this comment

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

How about introducing a decorator type - similar to accrue_checked or an implementation of TransactAsset - that wraps types with deactivate/reactivate logic? This would make support for this feature more explicit. These types could be used for purposes beyond just teleports.

@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[XCM] Teleported Assets Remain Active in Gov Support
4 participants