Skip to content

Commit caf0d0c

Browse files
authored
fix: Rewind output stream after adding dynamic assertions (#1358)
CawgValidate should not return errors since it will log.
1 parent 9fc179e commit caf0d0c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

sdk/src/identity/validator.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,13 @@ impl AsyncPostValidator for CawgValidator {
3939
) -> crate::Result<Option<Value>> {
4040
if label == "cawg.identity" || label.starts_with("cawg.identity__") {
4141
let identity_assertion: IdentityAssertion = assertion.to_assertion()?;
42-
tracker.push_current_uri(uri);
43-
42+
tracker.push_current_uri(uri.to_string());
4443
let result = identity_assertion
4544
.validate_partial_claim(partial_claim, tracker)
4645
.await
47-
.map(Some)
48-
.map_err(|e| crate::Error::ClaimVerification(e.to_string()));
49-
46+
.ok();
5047
tracker.pop_current_uri();
51-
return result;
48+
return Ok(result);
5249
};
5350
Ok(None)
5451
}

sdk/src/store.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,6 +2834,7 @@ impl Store {
28342834
}
28352835
_ => (),
28362836
};
2837+
output_stream.rewind()?;
28372838
}
28382839

28392840
let pc = self.provenance_claim().ok_or(Error::ClaimEncoding)?;

0 commit comments

Comments
 (0)