-
Notifications
You must be signed in to change notification settings - Fork 5
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
Dependency updates #54
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
use anyhow::anyhow; | ||
use gumdrop::Options; | ||
|
||
use uuid::Uuid; | ||
use zcash_client_backend::data_api::{Account, WalletRead}; | ||
use zcash_client_sqlite::{AccountId, WalletDb}; | ||
use zcash_client_sqlite::{AccountUuid, WalletDb}; | ||
use zcash_keys::keys::UnifiedAddressRequest; | ||
|
||
use crate::{config::get_wallet_network, data::get_db_paths}; | ||
|
||
// Options accepted for the `list-accounts` command | ||
#[derive(Debug, Options)] | ||
pub(crate) struct Command { | ||
#[options(free, required, help = "the ID of the account to list addresses for")] | ||
account_id: u32, | ||
#[options(free, required, help = "the UUID of the account to list addresses for")] | ||
account_id: Uuid, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm considering changing this to an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that the name is really needed for |
||
} | ||
|
||
impl Command { | ||
|
@@ -21,7 +22,7 @@ impl Command { | |
let db_data = WalletDb::for_path(db_data, params)?; | ||
|
||
let account = db_data | ||
.get_account(AccountId::from_u32(self.account_id))? | ||
.get_account(AccountUuid::from_uuid(self.account_id))? | ||
.ok_or_else(|| anyhow!("No account exists for account id {}", self.account_id))?; | ||
|
||
println!("Account {}", self.account_id); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the spending purpose holds a key derivation, I've changed the FVK import pathways to be view-only. We need to do that
init
refactor to provide a better way to prepare accounts.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fine for
init_fvk
, becauseinit
will subsume this command, butimport_ufvk
should be able to import aAccountPurpose::Spending
key; after all, the "standard" workflow for Zashi is to initialize with a seed, but then import the UFVK from the hardware wallet with derivation & key source information.Along those lines, I think that we should specify ZIP 316 metadata for seed fingerprint and hd account index data.