mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Asset Conversion: Pool Touch Call (#3251)
Introduce `touch` call designed to address operational prerequisites before providing liquidity to a pool. This function ensures that essential requirements, such as the presence of the pool's accounts, are fulfilled. It is particularly beneficial in scenarios where a pool creator removes the pool's accounts without providing liquidity. --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -1697,7 +1697,9 @@ pub mod pallet {
|
||||
|
||||
fn should_touch(asset: T::AssetId, who: &T::AccountId) -> bool {
|
||||
match Asset::<T, I>::get(&asset) {
|
||||
// refer to the [`Self::new_account`] function for more details.
|
||||
Some(info) if info.is_sufficient => false,
|
||||
Some(_) if frame_system::Pallet::<T>::can_accrue_consumers(who, 2) => false,
|
||||
Some(_) => !Account::<T, I>::contains_key(asset, who),
|
||||
_ => true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user