Skip to content

Commit

Permalink
refactor: small code improvement
Browse files Browse the repository at this point in the history
Co-authored-by: Augusto Hack <hack.augusto@gmail.com>
  • Loading branch information
polydez and hackaugusto authored Apr 1, 2024
1 parent 2be7dd5 commit b1b29e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions store/src/db/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ pub fn get_account_details(
)?;

let mut rows = stmt.query(params![u64_to_value(account_id)])?;
let Some(row) = rows.next()? else {
return Err(DatabaseError::AccountNotOnChain(account_id));
};
let row = rows.next()?.ok_or(Err(DatabaseError::AccountNotOnChain(account_id)))?;

let account = Account::new(
account_id.try_into()?,
Expand Down

0 comments on commit b1b29e5

Please sign in to comment.