lbryio / lbryio/lbry-sdk

Proper unlock wallet error/notification when using a wallet related commands

Open
#1,434 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: jsonrpc area: wallet type: improvement
Dominant language
Python
Stars
7.2k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

## The Issue
Currently, if you call a command that requires the wallet to be unlocked, you get the below feedback from the daemon (and the command stops). On the desktop app, we force users to unlock the wallet on startup, but it would be nice to provide an option or allow unlocking only when wallet related commands are run.

App developers will need a way to consistently tell when a wallet needs to be unlocked, wait for the password, and then proceed with the command execution. This would most likely require a specific error code (see https://github.com/lbryio/lbry/issues/1134) to then trigger the user for their password. After entering the password, the command should continue executing.

```
lbrynet-cli get one
ERROR: your wallet is locked
```
```2018-09-11 12:19:39,584 INFO lbrynet.core.Wallet:858: Waiting for wallet password```

## System Configuration

- LBRY Daemon version:
- LBRY App version:
- LBRY Installation ID:
- Operating system:

## Anything Else

## Screenshots

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the `lbrynet-cli get one` entry point and the daemon's wallet-locked response described in the issue. Trace how wallet-related commands report the locked state and how the app could distinguish it from other failures. Done should include a consistent unlock signal and command continuation after the password is supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.