You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the check-membership recipe, it shows how loose coupling is recommended over tight coupling.
The loose coupling example code is brilliant, and I was able to plug that into my projects codebase so I could have a membership.
But when I went to try out the code using the UI, I found that out of the box it didn't suit my use-case, and I had to make a minor tweak. And I think that my use-case would likely be more common that the current boilerplate.
So at the moment, when i tried it with polkadot.js.org/apps, the only accounts that you can add/remove to the membership are for the accounts that you have imported or created in polkadot.js.org/apps, since you can only add/remove the signer.
But I wanted to be able to add other accounts to the membership (for example from my address book, or even other accounts that weren't even mine, and I think that is a more likely scenario for most use cases.
So my proposal is just to add a second T::AccountId argument to both the add_member and remove_member functions, so the code would be like:
I'd be happy to create a PR if this is considered an improvement and a PR would be welcomed. It would require both vec-set and map-set pallets to be updated, along with their tests.
Or it could be created and labelled as an opportunity for a new Substrate developer to contribute.
Here is where i made the changes in my custom pallet where i used vec-set from Substrate recipes, and added that extra argument DataHighway-DHX/node@a6dff2a
The text was updated successfully, but these errors were encountered:
In the check-membership recipe, it shows how loose coupling is recommended over tight coupling.
The loose coupling example code is brilliant, and I was able to plug that into my projects codebase so I could have a membership.
But when I went to try out the code using the UI, I found that out of the box it didn't suit my use-case, and I had to make a minor tweak. And I think that my use-case would likely be more common that the current boilerplate.
So at the moment, when i tried it with polkadot.js.org/apps, the only accounts that you can add/remove to the membership are for the accounts that you have imported or created in polkadot.js.org/apps, since you can only add/remove the signer.
But I wanted to be able to add other accounts to the membership (for example from my address book, or even other accounts that weren't even mine, and I think that is a more likely scenario for most use cases.
So my proposal is just to add a second T::AccountId argument to both the
add_member
andremove_member
functions, so the code would be like:I'd be happy to create a PR if this is considered an improvement and a PR would be welcomed. It would require both vec-set and map-set pallets to be updated, along with their tests.
Or it could be created and labelled as an opportunity for a new Substrate developer to contribute.
Here is where i made the changes in my custom pallet where i used vec-set from Substrate recipes, and added that extra argument DataHighway-DHX/node@a6dff2a
The text was updated successfully, but these errors were encountered: