Explorar el Código

fix(redb): adding proof state to returned list twice

thesimplekid hace 9 meses
padre
commit
c376226910
Se han modificado 1 ficheros con 2 adiciones y 8 borrados
  1. 2 8
      crates/cdk-redb/src/mint/mod.rs

+ 2 - 8
crates/cdk-redb/src/mint/mod.rs

@@ -604,15 +604,9 @@ impl MintDatabase for MintRedbDatabase {
                 states.push(current_state);
                 states.push(current_state);
 
 
                 if current_state != Some(State::Spent) {
                 if current_state != Some(State::Spent) {
-                    match table
+                    table
                         .insert(y.to_bytes(), state_str.as_str())
                         .insert(y.to_bytes(), state_str.as_str())
-                        .map_err(Error::from)?
-                    {
-                        Some(state) => states.push(Some(
-                            serde_json::from_str(state.value()).map_err(Error::from)?,
-                        )),
-                        None => states.push(None),
-                    }
+                        .map_err(Error::from)?;
                 }
                 }
             }
             }
         }
         }