Skip to content
Closed
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
7 changes: 3 additions & 4 deletions src/ui/dashpay/contact_requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,10 @@ impl ContactRequests {
.id()
.to_string(dash_sdk::dpp::platform_value::string_encoding::Encoding::Base58);

// Get wallet for the selected identity
// Get wallet for the selected identity (don't show error on auto-select;
// some identities like evonodes may lack document signing keys)
new_self.selected_wallet =
get_selected_wallet(&identities[0], Some(&app_context), None)
.or_show_error(app_context.egui_ctx())
.unwrap_or(None);
get_selected_wallet(&identities[0], Some(&app_context), None).unwrap_or(None);

// Load requests from database for this identity
new_self.load_requests_from_database();
Expand Down
7 changes: 3 additions & 4 deletions src/ui/dashpay/qr_code_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ impl QRCodeGeneratorScreen {
new_self.selected_identity_string =
identities[0].identity.id().to_string(Encoding::Base58);

// Get wallet for the selected identity
// Get wallet for the selected identity (don't show error on auto-select;
// some identities like evonodes may lack document signing keys)
new_self.selected_wallet =
get_selected_wallet(&identities[0], Some(&app_context), None)
.or_show_error(app_context.egui_ctx())
.unwrap_or(None);
get_selected_wallet(&identities[0], Some(&app_context), None).unwrap_or(None);
}

new_self
Expand Down
13 changes: 11 additions & 2 deletions src/ui/identities/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,17 @@ pub fn get_selected_wallet(
qualified_identity
.document_signing_key(&preorder_document_type)
.ok_or_else(|| {
"Identity doesn't have an authentication key for signing document transitions"
.to_string()
use dash_sdk::dpp::identity::accessors::IdentityGettersV0;
let identity_label = qualified_identity
.alias
.as_deref()
.or_else(|| qualified_identity.dpns_names.first().map(|n| n.name.as_str()))
.unwrap_or("unknown");
format!(
"Identity '{}' ({}) doesn't have an authentication key for signing document transitions",
identity_label,
qualified_identity.identity.id()
)
})?
} else {
// Fallback: directly use the provided selected key.
Expand Down