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

Update module-accounts close_account to remove proxies as well #549

Closed
xlc opened this issue Nov 18, 2020 · 1 comment
Closed

Update module-accounts close_account to remove proxies as well #549

xlc opened this issue Nov 18, 2020 · 1 comment

Comments

@xlc
Copy link
Member

xlc commented Nov 18, 2020

It was not possible to call close_account for proxy created via module-nft because close_account requires no other reserved token and proxy is the only way to call close_account which means it will have reserved token.

The solution is to make close_account remove all the proxies first and then attempt to close the account.

Before paritytech/substrate#7557 is ready, we can just do this to remove proxies

let (_, proxy_deposit) = pallet_proxy::Proxies::<T>::take(&class_info.owner);
<T as pallet_proxy::Trait>::Currency::unreserve(&class_info.owner, proxy_deposit);
@xlc
Copy link
Member Author

xlc commented Nov 23, 2020

No longer needed after #566

@xlc xlc closed this as completed Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant