Skip to content

Commit

Permalink
chore: remove unused generated id
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Mar 31, 2024
1 parent 75dc175 commit 0941671
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions moksha-wallet/src/localstore/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,18 @@ impl LocalStore for SqliteLocalStore {
tx: &mut sqlx::Transaction<Self::DB>,
keyset: &WalletKeyset,
) -> Result<(), MokshaWalletError> {
let row: (i64,) = sqlx::query_as(
sqlx::query(
r#"INSERT INTO keysets (keyset_id, mint_url, currency_unit, last_index, public_keys, active) VALUES ($1, $2, $3, $4, $5, $6)
ON CONFLICT(keyset_id, mint_url) DO UPDATE SET currency_unit = $3, last_index = $4, public_keys = $5, active = $6;
SELECT last_insert_rowid() as id;
"#)
.bind(keyset.keyset_id.to_owned())
.bind(keyset.mint_url.as_str())
.bind(keyset.currency_unit.to_string())
.bind(keyset.last_index as i64)
.bind(serde_json::to_string(&keyset.public_keys)?)
.bind(keyset.active)
.fetch_one(&mut **tx)
.execute(&mut **tx)
.await?;
// FIXME do we need the id?
Ok(())
}

Expand Down

0 comments on commit 0941671

Please sign in to comment.