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

Add commands to shield funds #65

Merged
merged 2 commits into from
Dec 14, 2024
Merged

Add commands to shield funds #65

merged 2 commits into from
Dec 14, 2024

Conversation

str4d
Copy link
Collaborator

@str4d str4d commented Dec 14, 2024

No description provided.

Copy link
Collaborator

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

Looks good but it should be possible to specify the account (with default iff there is only one account).

Comment on lines 70 to 73
let account_id = *db_data
.get_account_ids()?
.first()
.ok_or(anyhow!("Wallet has no accounts"))?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The account to use should be an optional CLI argument; this should only be a default & the default should only be allowed when there is only one account in the wallet.

let derivation = account
.source()
.key_derivation()
.ok_or(anyhow!("Cannot spend from view-only accounts"))?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.ok_or(anyhow!("Cannot spend from view-only accounts"))?;
.ok_or(anyhow!("Cannot spend from view-only accounts; did you mean to use `pczt shield` instead?"))?;

Base automatically changed from pczt-inspect to main December 14, 2024 14:53
Copy link
Collaborator

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

utACK; making the account ID optional in the case that there is only one account can be done later.

@str4d str4d merged commit 39b668a into main Dec 14, 2024
17 checks passed
@str4d str4d deleted the shield-funds branch December 14, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants