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

Bug: Wallet doesn't let you delete, import, then delete again #4621

Closed
EntropyPool opened this issue Oct 28, 2020 · 2 comments · Fixed by #4653
Closed

Bug: Wallet doesn't let you delete, import, then delete again #4621

EntropyPool opened this issue Oct 28, 2020 · 2 comments · Fixed by #4653
Assignees
Labels
effort/hours Effort: Hours good first issue Good for newcomers P3 P3: Might get resolved

Comments

@EntropyPool
Copy link

Describe the bug
I export the private key firstly, then i delete the wallet address, then import the address again, and then, i want to delete the wallet address again. At last i fail to delete the wallet address.

To Reproduce
Steps to reproduce the behavior:

  1. Run 'lotus wallet export f1xxxxxxx > f1xxxxxx.keyinfo'
  2. Run 'lotus wallet delete f1xxxxxx', this time the address is deleted as expected
  3. Run 'lotus wallet import f1xxxxxx.keyinfo'
  4. Run 'lotus wallet delete f1xxxxxx'
  5. Cannot delete the wallet address any more
    root@241:/home/test# lotus wallet delete f1xxxxxx
    ERROR: failed to mark key f1xxxxxx as trashed: checking key before put 'trash-f1xxxxxx': key already exists

Expected behavior
The wallet address should be deleted as expected.

Screenshots
N/A

Version (run lotus version):
lotus version 1.1.2+git.009f0962

Additional context
N/A.

@whyrusleeping
Copy link
Member

Ah nice, thats a bug. We never truly delete keys, we always just rename them so you don't accidentally do a bad thing. Deleting it twice would fail for the same reason that overwriting a key would fail.

@whyrusleeping whyrusleeping added the good first issue Good for newcomers label Oct 28, 2020
@jennijuju jennijuju self-assigned this Oct 28, 2020
@arajasek arajasek added P3 P3: Might get resolved effort/minutes labels Oct 30, 2020
@arajasek arajasek changed the title After import a privage key with 'lotus wallet import xxx', i cannot delete the imported wallet address any more Bug: Wallet doesn't let you delete, import, then delete again Oct 30, 2020
@EntropyPool
Copy link
Author

Ah~ the use case is something like that: before i have a cold wallet, i use a separate address to store my money(looooooooot of money, hahahahaha). so i cannot leave the wallet in a online fullnode. when i need to transfer money, i import the key. after than, i delete it. i think we can have an offline method, just like the cold wallet of bitcoin. i generate the message with offline PC with my key, and broadcast it with an online node without my key.

@dineshshenoy dineshshenoy added effort/hours Effort: Hours and removed effort/minutes labels Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Effort: Hours good first issue Good for newcomers P3 P3: Might get resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants