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

Delete key from GUI fails [Bug] #16995

Closed
danieljperry opened this issue Dec 5, 2023 · 3 comments · Fixed by #17523
Closed

Delete key from GUI fails [Bug] #16995

danieljperry opened this issue Dec 5, 2023 · 3 comments · Fixed by #17523
Assignees
Labels
bug Something isn't working

Comments

@danieljperry
Copy link
Contributor

What happened?

Delete key from the GUI fails, but it succeeds from the CLI.

To recreate:

  • create a new key with the GUI
  • "logout" to show the wallet keys diaglog
  • Click the three vertical dots on the new key, and click Delete

A new spinner appears, but the key is not deleted. A WARNING message appears in the log (see below).

I'm seeing the same behavior on Windows and Linux. The wallet is synced when I attempt to delete it. It doesn't seem to matter whether the node is synced.

The stack trace is from 2.0.1, though I'm also seeing it in 2.1.2-rc2.

Version

2.0.1

What platform are you using?

Windows

What ui mode are you using?

GUI

Relevant log output

2023-12-05T13:35:19.539 wallet chia.rpc.rpc_server        : WARNING  Error while handling message: Traceback (most recent call last):
  File "chia/rpc/rpc_server.py", line 340, in safe_handle
  File "chia/rpc/rpc_server.py", line 331, in ws_api
  File "chia/rpc/wallet_rpc_api.py", line 462, in check_delete_key
  File "chia/rpc/wallet_rpc_api.py", line 440, in _check_key_used_for_rewards
  File "chia/util/bech32m.py", line 120, in decode_puzzle_hash
ValueError: Invalid Address
@danieljperry danieljperry added the bug Something isn't working label Dec 5, 2023
@paninaro paninaro self-assigned this Dec 6, 2023
@paninaro
Copy link
Contributor

paninaro commented Dec 6, 2023

@danieljperry while the spinner is visible, the GUI is asking the wallet to check if the wallet-to-be-deleted is used for farming or pool rewards. The code in question is:

        farmer_target = config["farmer"].get("xch_target_address")
        pool_target = config["pool"].get("xch_target_address")
        address_to_check: List[bytes32] = [decode_puzzle_hash(farmer_target), decode_puzzle_hash(pool_target)]

Can you check if your config has valid values for the farmer/pool xch_target_address?

@danieljperry
Copy link
Contributor Author

Thanks, that was the issue. Both instances of the target address were blank:
xch_target_address: ''

When I added a real address, I could delete the key. However, the UX issue still remains. If I am just running a wallet and am not farming, I cannot delete a key from the GUI unless I add a dummy address to my config.yaml. Before the address_to_check line, would it be possible to check whether the farmer_target and pool_target are valid addresses?

@wjblanke
Copy link
Contributor

Zlatko can u take a look at this if u have some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants