Account delete#3
Draft
juan518munoz wants to merge 7 commits intomainfrom
Draft
Conversation
igamigo
reviewed
Nov 27, 2023
| .map_err(StoreError::QueryError) | ||
| } | ||
|
|
||
| pub fn remove_account(&self, account_id: u64) -> Result<(), StoreError> { |
Collaborator
There was a problem hiding this comment.
Let's make sure related objects are deleted as well for this command. In the future this can be optional if we see a scenario where it's positive to eliminate only partial data related to an account.
Author
There was a problem hiding this comment.
Added in latest commit, I'm unsure what to do with the associated row on the account_code table, should we only remove it if no other account makes use of it?
| let q = self | ||
| .db | ||
| .execute( | ||
| "DELETE FROM accounts WHERE id = ?", |
Collaborator
There was a problem hiding this comment.
If it's simple enough, it would be nice to see a test that tests this function.
Author
There was a problem hiding this comment.
Yes, to do this we should merge this branch with cli testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
account deletecommand to the CLI.Test:
cargo run --release --features testing -- account new fungible-faucet -t TEST -d 10 -m 10000cargo run --release --features testing -- account listcargo run --release --features testing -- account -r 0x880448d77a6ec824Pending unit test