diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index 00eb394ec..d490a5339 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -7,10 +7,13 @@ and this library adheres to Rust's notion of ## [Unreleased] +### Fixed +- A bug in the SQL query for `WalletDb::get_account_birthday` was fixed. + ## [0.10.2] - 2024-03-27 ### Fixed -- A bug in the SQL querey for `WalletDb::get_unspent_transparent_output` was fixed. +- A bug in the SQL query for `WalletDb::get_unspent_transparent_output` was fixed. ## [0.10.1] - 2024-03-25 diff --git a/zcash_client_sqlite/src/wallet.rs b/zcash_client_sqlite/src/wallet.rs index d6e8164d4..82a802a89 100644 --- a/zcash_client_sqlite/src/wallet.rs +++ b/zcash_client_sqlite/src/wallet.rs @@ -1591,7 +1591,7 @@ pub(crate) fn account_birthday( conn.query_row( "SELECT birthday_height FROM accounts - WHERE account = :account_id", + WHERE id = :account_id", named_params![":account_id": account.0], |row| row.get::<_, u32>(0).map(BlockHeight::from), ) @@ -3212,6 +3212,9 @@ mod tests { .build(); let account_id = st.test_account().unwrap().account_id(); - assert_matches!(account_birthday(&st.wallet().conn, account_id), Ok(_)) + assert_matches!( + account_birthday(&st.wallet().conn, account_id), + Ok(birthday) if birthday == st.sapling_activation_height() + ) } }