Skip to content

Commit

Permalink
finish debugging, add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DougAnderson444 committed Feb 21, 2024
1 parent 7220838 commit 6011ff8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/delano-events/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use utils::PayloadEncoding;
#[cfg(doctest)]
pub struct ReadmeDoctests;

/// The Context of the event.
/// The Context of the event, `jco` compatible (<https://github.com/bytecodealliance/jco>)
/// This event is deisgned to pass through `jco` WIT, which expects variants to be {tag: _, val: _} in lower kebab-case.
/// Any messages serialized by serde converts Vec to an Array, however `jco` expects TypedArrays.
/// To avoid this issue, we serialize the Type bytes as base64 string to avoid missing TypedArray issue.
Expand Down
3 changes: 0 additions & 3 deletions crates/delano-wit-ui/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ impl State {

/// Generate offer from this State is there is nothing loaded.
pub(crate) fn offer(&mut self) -> Result<Option<String>, String> {
println!("Creating Offer");
match self.loaded {
Loaded::None => {
// use self.credential
Expand Down Expand Up @@ -203,8 +202,6 @@ impl State {
// Emit the message
wurbo_in::emit(&message);

println!("Subscribe Event Emitted.");

Ok(Some(offered))
}
_ => Ok(None),
Expand Down
7 changes: 2 additions & 5 deletions crates/delano-wit-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,15 @@ impl From<&context_types::Context> for StructContext {
}
// Generate an Offer with the current data
context_types::Context::Generateoffer => {
let r = StructContext::from(api::State::from_latest().with_offer())
.with_target(OUTPUT_HTML.to_string());
println!("Rendering post-Offer HTML");
r
StructContext::from(api::State::from_latest().with_offer())
.with_target(OUTPUT_HTML.to_string())
}
// Generate a Proof with the current data
context_types::Context::Generateproof => {
StructContext::from(api::State::from_latest().with_proof())
.with_target(OUTPUT_HTML.to_string())
}
context_types::Context::Publishproof => {
println!("Publishing proof handler");
// emit publish event
StructContext::from(api::State::from_latest().publish_proof())
.with_target(OUTPUT_HTML.to_string())
Expand Down

0 comments on commit 6011ff8

Please sign in to comment.