Procházet zdrojové kódy

Minor change for msvr

Cesar Rodas před 5 měsíci
rodič
revize
c9ca8bb0d6

+ 5 - 2
crates/cdk-sqlite/src/mint/auth/mod.rs

@@ -168,7 +168,7 @@ impl MintAuthDatabase for MintSqliteAuthDatabase {
     }
 
     async fn add_proof(&self, proof: AuthProof) -> Result<(), Self::Err> {
-        query(
+        if let Err(err) = query(
             r#"
             INSERT INTO proof
             (y, keyset_id, secret, c, state)
@@ -182,7 +182,10 @@ impl MintAuthDatabase for MintSqliteAuthDatabase {
         .bind(":c", proof.c.to_bytes().to_vec())
         .bind(":state", "UNSPENT".to_string())
         .execute(&self.pool)
-        .await?;
+        .await
+        {
+            tracing::debug!("Attempting to add known proof. Skipping.... {:?}", err);
+        }
         Ok(())
     }
 

+ 3 - 1
crates/cdk-sqlite/src/mint/mod.rs

@@ -964,7 +964,9 @@ impl MintProofsDatabase for MintSqliteDatabase {
         .await?
         .into_iter()
         .map(sqlite_row_to_proof_with_state)
-        .collect::<Result<(Vec<_>, Vec<_>), _>>()?)
+        .collect::<Result<Vec<_>, _>>()?
+        .into_iter()
+        .unzip())
     }
 
     async fn update_proofs_states(