Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add remove_proxies API for pallet-proxies #7557

Closed
xlc opened this issue Nov 18, 2020 · 4 comments · Fixed by #12714
Closed

Add remove_proxies API for pallet-proxies #7557

xlc opened this issue Nov 18, 2020 · 4 comments · Fixed by #12714
Assignees
Labels
J0-enhancement An additional feature request. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@xlc
Copy link
Contributor

xlc commented Nov 18, 2020

Add a pub API to remove all the proxies so other pallets can call this.

fn remove_proxies(origin) {
let who = ensure_signed(origin)?;
let (_, old_deposit) = Proxies::<T>::take(&who);
T::Currency::unreserve(&who, old_deposit);
}

@apopiak apopiak added the J0-enhancement An additional feature request. label Dec 8, 2021
@shawntabrizi shawntabrizi added Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. labels Dec 14, 2021
@vjgaur
Copy link
Contributor

vjgaur commented Nov 14, 2022

I want to take up this as my first substrate issue. Would you please mind explaining a little on this issue for me to get started ?

@xlc
Copy link
Contributor Author

xlc commented Nov 14, 2022

Verify similar to remove_proxy

fn remove_proxy(origin,
delegate: T::AccountId,
proxy_type: T::ProxyType,
delay: T::BlockNumber,
) -> DispatchResult {
let who = ensure_signed(origin)?;
Self::remove_proxy_delegate(&who, delegate, proxy_type, delay)
}

Add new method pub remove_all_proxy_delegates, move the logic there, call this method from remove_proxies.

@vjgaur
Copy link
Contributor

vjgaur commented Nov 16, 2022

Ok cool

vjgaur added a commit to vjgaur/substrate that referenced this issue Nov 16, 2022
Add remove_proxies API for pallet-proxies
paritytech#7557
@vjgaur
Copy link
Contributor

vjgaur commented Nov 16, 2022

Hi please find my PR. I am unable to add a reviewer

paritytech-processbot bot pushed a commit that referenced this issue May 26, 2023
* Open
Add remove_proxies API for pallet-proxies
#7557

* added remove_all_proxy_delegates method

* remove all proxy implementation

* remove_all_proxy_delegate

* reverted changes

* fixed 7557

* fixed warnings

* removed println! causing build failure on ci/cd pipelines

* incorporated suggested changes

* minor change

* made suggested changes

* method comment

* Update frame/proxy/src/lib.rs

---------

Co-authored-by: Juan <juangirini@gmail.com>
Co-authored-by: parity-processbot <>
Ank4n pushed a commit that referenced this issue Jul 8, 2023
* Open
Add remove_proxies API for pallet-proxies
#7557

* added remove_all_proxy_delegates method

* remove all proxy implementation

* remove_all_proxy_delegate

* reverted changes

* fixed 7557

* fixed warnings

* removed println! causing build failure on ci/cd pipelines

* incorporated suggested changes

* minor change

* made suggested changes

* method comment

* Update frame/proxy/src/lib.rs

---------

Co-authored-by: Juan <juangirini@gmail.com>
Co-authored-by: parity-processbot <>
nathanwhit pushed a commit to nathanwhit/substrate that referenced this issue Jul 19, 2023
…#12714)

* Open
Add remove_proxies API for pallet-proxies
paritytech#7557

* added remove_all_proxy_delegates method

* remove all proxy implementation

* remove_all_proxy_delegate

* reverted changes

* fixed 7557

* fixed warnings

* removed println! causing build failure on ci/cd pipelines

* incorporated suggested changes

* minor change

* made suggested changes

* method comment

* Update frame/proxy/src/lib.rs

---------

Co-authored-by: Juan <juangirini@gmail.com>
Co-authored-by: parity-processbot <>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants