Skip to content

Commit e79afab

Browse files
[stable2506] Backport #9489 (#9492)
Backport #9489 into `stable2506` from raymondkfcheung. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: Raymond Cheung <[email protected]>
1 parent 7231580 commit e79afab

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

polkadot/xcm/pallet-xcm/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3712,7 +3712,6 @@ impl<T: Config> xcm_executor::traits::AssetLock for Pallet<T> {
37123712
use xcm_executor::traits::LockError::*;
37133713
let sovereign_account = T::SovereignAccountOf::convert_location(&owner).ok_or(BadOwner)?;
37143714
let amount = T::CurrencyMatcher::matches_fungible(&asset).ok_or(UnknownAsset)?;
3715-
ensure!(T::Currency::free_balance(&sovereign_account) >= amount, AssetNotOwned);
37163715
let locks = LockedFungibles::<T>::get(&sovereign_account).unwrap_or_default();
37173716
let item_index =
37183717
locks.iter().position(|x| x.1.try_as::<_>() == Ok(&unlocker)).ok_or(NotLocked)?;

prdoc/pr_9489.prdoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
title: Remove free balance check in prepare_unlock
2+
doc:
3+
- audience: Runtime Dev
4+
description: The free balance check during unlocking is unnecessary since a lock can cover both free and reserved
5+
balances. Removing it allows locks to be cleared even if part of the locked funds is reserved or already slashed.
6+
crates:
7+
- name: pallet-xcm
8+
bump: patch

0 commit comments

Comments
 (0)