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

cli: implement wallet remove-account #757

Merged
merged 6 commits into from
Mar 16, 2020
Merged

cli: implement wallet remove-account #757

merged 6 commits into from
Mar 16, 2020

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Mar 13, 2020

  1. Remove accounts.
  2. Remove tokens.
  3. Import custom contracts.

Closes #26. Seems like everything is implemented :)

@codecov
Copy link

codecov bot commented Mar 13, 2020

Codecov Report

Merging #757 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #757      +/-   ##
==========================================
+ Coverage   64.84%   64.89%   +0.05%     
==========================================
  Files         141      141              
  Lines       12779    12793      +14     
==========================================
+ Hits         8286     8302      +16     
+ Misses       4091     4089       -2     
  Partials      402      402
Impacted Files Coverage Δ
pkg/wallet/wallet.go 82.71% <100%> (+6.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d742733...325dc7d. Read the comment docs.

cli/wallet/wallet.go Outdated Show resolved Hide resolved
cli/wallet/wallet.go Outdated Show resolved Hide resolved
// Probably there are better ways to ask.
// See https://www.dartmouth.edu/consent/communication/howdo.html
// Examples of Questions to Ask
fmt.Print("Are you sure? [y/N]: ")
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure (this will irrevocably destroy the associated private key)? [y/N]:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The phrase in brackets needs to be printed before this function is invoked (it is used in both remove-account and nep5 remove).

Copy link
Member

Choose a reason for hiding this comment

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

Do we need to ask for nep5 removal? It can easily be undone, unlike destroying an account.

cli/wallet/wallet.go Outdated Show resolved Hide resolved
cli/wallet/nep5.go Outdated Show resolved Hide resolved
Creating accounts is done frequently so it makes
sense to have lesser name for this command.
`create` -> `init`
`create-account` -> `create`
Make it possible to remove unneeded accounts from wallet.
Sometimes we need to use custom verification script, e.g.
for contracts where funds needs to become accessible only
after a certain amount of time.
Also add tests for Add/RemoveToken
Remove unused tokens from the wallet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Completely new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wallet: functionality for creating a native neo-go wallet
2 participants