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

refactor: iss735 restructure kvstore pallet #753

Conversation

sameh-farouk
Copy link
Member

@sameh-farouk sameh-farouk commented Jun 19, 2023

Changes:

  • moving extrinsics logic in kvstore pallet out from crate root to separated module.

Related issues:

@sameh-farouk sameh-farouk changed the title iss735: restructure kvstore pallet refactor: iss735 restructure kvstore pallet Jun 19, 2023
@sameh-farouk sameh-farouk marked this pull request as ready for review June 19, 2023 18:01
Copy link
Collaborator

@renauter renauter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Some detail
I suggest to use vs code with rust-analyzer extension and formatOnSave=true to get homogeneous formatting

@sameh-farouk
Copy link
Member Author

sameh-farouk commented Jun 20, 2023

Looks good! Some detail I suggest to use vs code with rust-analyzer extension and formatOnSave=true to get homogeneous formatting

Thanks for the advice, I enabled formatOnSave and set the mode for only modification which I preferred to avoid longer than intended changes.

use sp_std::prelude::Vec;

impl<T: Config> Pallet<T> {
pub fn _set(user: T::AccountId, key: Vec<u8>, value: Vec<u8>) -> DispatchResultWithPostInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have some tests for it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set function is almost wrapper for _set function. I see we have tests::test_set_and_get to test set function which should enough i guess.

@DylanVerstraete DylanVerstraete merged commit ca04332 into threefoldtech:development Jul 3, 2023
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

Successfully merging this pull request may close these issues.

4 participants