Drop the check on the error message

This commit is contained in:
Andrew Arnott 2024-07-18 13:00:18 -06:00
parent 2ee56f77f2
commit 36b3fc866a
No known key found for this signature in database
GPG Key ID: 251505B99C25745D
1 changed files with 6 additions and 8 deletions

View File

@ -422,14 +422,12 @@ pub(crate) fn add_account<P: consensus::Parameters>(
// An account conflict occurred.
// Make a best effort to determine the AccountId of the pre-existing row
// and provide that to our caller.
if s.clone().is_some_and(|s| s.contains(".ufvk")) {
if let Ok(id) = conn.query_row(
"SELECT id FROM accounts WHERE ufvk = ?",
params![ufvk_encoded],
|row| Ok(AccountId(row.get(0)?)),
) {
return SqliteClientError::AccountCollision(id);
}
if let Ok(id) = conn.query_row(
"SELECT id FROM accounts WHERE ufvk = ?",
params![ufvk_encoded],
|row| Ok(AccountId(row.get(0)?)),
) {
return SqliteClientError::AccountCollision(id);
}
SqliteClientError::from(rusqlite::Error::SqliteFailure(f, s))