Bläddra i källkod

Fix `get_mint_quote_by_request_lookup_id`

Fixes #916

The two functions (read and transaction) got out of sync
Cesar Rodas 2 månader sedan
förälder
incheckning
0041c135f7
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5 5
      crates/cdk-sql-common/src/mint/mod.rs

+ 5 - 5
crates/cdk-sql-common/src/mint/mod.rs

@@ -1124,12 +1124,12 @@ where
                 request_lookup_id_kind
             FROM
                 mint_quote
-            WHERE request_lookup_id = :request_lookup_id"#,
+            WHERE request_lookup_id = :request_lookup_id
+            AND request_lookup_id_kind = :request_lookup_id_kind
+            "#,
         )?
-        .bind(
-            "request_lookup_id",
-            serde_json::to_string(request_lookup_id)?,
-        )
+        .bind("request_lookup_id", request_lookup_id.to_string())
+        .bind("request_lookup_id_kind", request_lookup_id.kind())
         .fetch_one(&self.db)
         .await?
         .map(|row| sql_row_to_mint_quote(row, vec![], vec![]))