Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Changes from 1 commit
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
Next Next commit
add check for balance zero on locked value
  • Loading branch information
vstam1 committed May 12, 2023
commit ab6ca0b4833621deddae6056c8e7f90ed9609135
7 changes: 6 additions & 1 deletion xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,12 @@ impl<T: Config> xcm_executor::traits::Enact for UnlockTicket<T> {
}
LockedFungibles::<T>::insert(&self.sovereign_account, locks);
let reasons = WithdrawReasons::all();
T::Currency::set_lock(*b"py/xcmlk", &self.sovereign_account, locked, reasons);

if locked.is_zero() {
T::Currency::remove_lock(*b"py/xcmlk", &self.sovereign_account);
} else {
T::Currency::set_lock(*b"py/xcmlk", &self.sovereign_account, locked, reasons);
}
Ok(())
}
}
Expand Down