diff --git a/zcash_client_backend/src/data_api/mod.rs b/zcash_client_backend/src/data_api/mod.rs index c9772516d..844c4687a 100644 --- a/zcash_client_backend/src/data_api/mod.rs +++ b/zcash_client_backend/src/data_api/mod.rs @@ -58,7 +58,7 @@ pub trait DBOps { account: AccountId, ) -> Result, Self::Error>; - fn get_account_extfvks( + fn get_extended_full_viewing_keys( &self, params: &P, ) -> Result, Self::Error>; @@ -74,11 +74,6 @@ pub trait DBOps { fn get_sent_memo_as_utf8(&self, id_note: Self::NoteRef) -> Result, Self::Error>; - fn get_extended_full_viewing_keys( - &self, - params: &P, - ) -> Result, Self::Error>; - fn get_commitment_tree( &self, block_height: BlockHeight, diff --git a/zcash_client_backend/src/data_api/wallet.rs b/zcash_client_backend/src/data_api/wallet.rs index ccb9c6827..4ab3b2fc4 100644 --- a/zcash_client_backend/src/data_api/wallet.rs +++ b/zcash_client_backend/src/data_api/wallet.rs @@ -23,7 +23,7 @@ where &'db D: DBOps, { // Fetch the ExtendedFullViewingKeys we are tracking - let extfvks = data.get_account_extfvks(params)?; + let extfvks = data.get_extended_full_viewing_keys(params)?; // Height is block height for mined transactions, and the "mempool height" (chain height + 1) // for mempool transactions. diff --git a/zcash_client_backend/src/wallet.rs b/zcash_client_backend/src/wallet.rs index 609edc189..9f78f99df 100644 --- a/zcash_client_backend/src/wallet.rs +++ b/zcash_client_backend/src/wallet.rs @@ -8,7 +8,6 @@ use zcash_primitives::{ transaction::TxId, }; - /// A type-safe wrapper for account identifiers. #[derive(Debug, Copy, Clone)] pub struct AccountId(pub u32); diff --git a/zcash_client_sqlite/src/lib.rs b/zcash_client_sqlite/src/lib.rs index 841bf758c..dbae80863 100644 --- a/zcash_client_sqlite/src/lib.rs +++ b/zcash_client_sqlite/src/lib.rs @@ -42,8 +42,8 @@ use zcash_primitives::{ }; use zcash_client_backend::{ - data_api::{error::Error, CacheOps, DBOps, DBUpdate, ShieldedOutput}, - encoding::{decode_extended_full_viewing_key, encode_payment_address}, + data_api::{CacheOps, DBOps, DBUpdate, ShieldedOutput}, + encoding::encode_payment_address, proto::compact_formats::CompactBlock, wallet::{AccountId, WalletTx}, DecryptedOutput, @@ -127,25 +127,6 @@ impl<'a> DBOps for &'a DataConnection { wallet::get_address(self, params, account) } - fn get_account_extfvks( - &self, - params: &P, - ) -> Result, Self::Error> { - self.0 - .prepare("SELECT extfvk FROM accounts ORDER BY account ASC")? - .query_map(NO_PARAMS, |row| { - row.get(0).map(|extfvk: String| { - decode_extended_full_viewing_key( - params.hrp_sapling_extended_full_viewing_key(), - &extfvk, - ) - }) - })? - // Raise SQL errors from the query, IO errors from parsing, and incorrect HRP errors. - .collect::, _>, _>>()?? - .ok_or(SqliteClientError(Error::IncorrectHRPExtFVK)) - } - fn get_balance(&self, account: AccountId) -> Result { wallet::get_balance(self, account) }