Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ blurhash = { version = "0.2.3", default-features = false }
## Commit "f0bc4625dcd729e07e4a36257df2f1d94c81cef4" is the most recent one without the invalid change to pin serde to 1.0.219.
## See my issue here: <https://github.com/openwallet-foundation-labs/tsp/issues/237>.
## However, that commit doesn't build.... yikes. So we have to use a slightly older commit in the "rev" field below.
tsp_sdk = { git = "https://github.com/openwallet-foundation-labs/tsp.git", rev = "1cd0cc9442e144ad7c01ccd30daffbb3a52c0f20", optional = true, features = ["async", "resolve"] }
tsp_sdk = { git = "https://github.com/openwallet-foundation-labs/tsp.git", rev = "1cd0cc9442e144ad7c01ccd30daffbb3a52c0f20", optional = true, features = ["async", "resolve", "create-webvh"] }
quinn = { version = "0.11", default-features = false, optional = true }
## We only include this such that we can specify the prebuilt-nasm features,
## which is required to build this on Windows x86_64 without having to install NASM separately.
Expand Down
20 changes: 18 additions & 2 deletions src/tsp/create_did_modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ live_design! {
}
did_webvh = <RadioButtonFlat> {
text: "WebVH"
animator: { disabled = { default: on } }
}
did_peer = <RadioButtonFlat> {
text: "Peer",
Expand Down Expand Up @@ -359,13 +358,30 @@ impl WidgetMatchEvent for CreateDidModal {
"" => did_server_input.empty_text(),
non_empty => non_empty.to_string(),
};

// Determine which DID type is selected from the radio buttons
// Since Web is set as default active in the UI, we check the others first

let did_type = if let Some(widget_idex) = self.view.radio_button_set(ids_array!(
did_type_radio_buttons.did_webvh,
did_type_radio_buttons.did_peer,
)).selected(cx, actions) {
if widget_idex == 0 {
tsp::DidType::WebVh
} else {
tsp::DidType::Peer
}
} else {
tsp::DidType::Web
};

// Submit the identity creation request to the TSP async worker thread.
tsp::submit_tsp_request(tsp::TspRequest::CreateDid {
username: username.to_string(),
alias,
server,
did_server
did_server,
did_type,
});

self.state = CreateDidModalState::WaitingForIdentityCreation;
Expand Down
Loading