Skip to content
Merged
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
88 changes: 44 additions & 44 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 @@ -18,7 +18,7 @@ qrcode = "0.14.1"
nix = { version = "0.30.1", features = ["signal"] }
eframe = { version = "0.32.0", features = ["persistence"] }
base64 = "0.22.1"
dash-sdk = { git = "https://github.com/dashpay/platform", features = ["core_key_wallet", "core_bincode", "core_quorum-validation", "core_verification", "core_rpc_client"], rev = "d3f3c930a618030be807bb257e7434ef3df090b5" }
dash-sdk = { git = "https://github.com/dashpay/platform", features = ["core_key_wallet", "core_bincode", "core_quorum-validation", "core_verification", "core_rpc_client"], rev = "d6f9d9e74b885fbac27948bce6bae60b0cbd7135" }
thiserror = "2.0.12"
serde = "1.0.219"
serde_json = "1.0.140"
Expand Down
2 changes: 2 additions & 0 deletions src/backend_task/identity/register_dpns_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ impl AppContext {
let preorder_document = Document::V0(DocumentV0 {
id: preorder_id,
owner_id: qualified_identity.identity.id(),
creator_id: None,
properties: BTreeMap::from([(
"saltedDomainHash".to_string(),
salted_domain_hash.into(),
Expand All @@ -78,6 +79,7 @@ impl AppContext {
let domain_document = Document::V0(DocumentV0 {
id: domain_id,
owner_id: qualified_identity.identity.id(),
creator_id: None,
properties: BTreeMap::from([
("parentDomainName".to_string(), "dash".into()),
("normalizedParentDomainName".to_string(), "dash".into()),
Expand Down
2 changes: 2 additions & 0 deletions src/backend_task/tokens/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,8 @@ impl AppContext {
let mut validation_operations = Vec::new();
match dash_sdk::dpp::data_contract::document_type::DocumentType::try_from_schema(
contract_id,
0,
0,
&name,
platform_value,
None, // schema_defs
Expand Down
19 changes: 7 additions & 12 deletions src/backend_task/tokens/query_tokens.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
//! Execute token query by keyword on Platform

use crate::{
backend_task::BackendTaskSuccessResult, context::AppContext,
ui::tokens::tokens_screen::ContractDescriptionInfo,
};
use dash_sdk::{
Sdk,
dpp::{document::DocumentV0Getters, platform_value::Value},
Expand All @@ -10,11 +14,6 @@ use dash_sdk::{
},
};

use crate::{
backend_task::BackendTaskSuccessResult, context::AppContext,
ui::tokens::tokens_screen::ContractDescriptionInfo,
};

impl AppContext {
/// 1. Fetch all **contractKeywords** docs that match `keyword` from the Search Contract
/// 2. For every `contractId` found, fetch its **shortDescription** document from the Search Contract
Expand All @@ -39,19 +38,15 @@ impl AppContext {

let kw_docs = Document::fetch_many(sdk, kw_query.clone())
.await
.map_err(|e| format!("Error fetching keyword docs: {e}"))?;
.map_err(|e| e.to_string())?;

// store the order for deterministic pagination
let mut contract_ids: Vec<Identifier> = Vec::with_capacity(kw_docs.len());
for (_doc_id, doc_opt) in kw_docs.iter() {
if let Some(doc) = doc_opt
&& let Some(cid_val) = doc.get("contractId")
{
contract_ids.push(
cid_val
.to_identifier()
.map_err(|e| format!("Bad contractId: {e}"))?,
);
contract_ids.push(cid_val.to_identifier().map_err(|e| e.to_string())?);
}
}

Expand Down Expand Up @@ -85,7 +80,7 @@ impl AppContext {
let description = if let Some((_, Some(desc_doc))) =
Document::fetch_many(sdk, desc_query)
.await
.map_err(|e| format!("Error fetching description doc: {e}"))?
.map_err(|e| e.to_string())?
.into_iter()
.next()
{
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/contract_chooser_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ pub fn add_contract_chooser_panel(

SidePanel::left("contract_chooser_panel")
// Let the user resize this panel horizontally
.resizable(false)
.default_width(270.0) // Increased to account for margins
.resizable(true)
.default_width(270.0)
.frame(
Frame::new()
.fill(DashColors::background(dark_mode))
Expand Down
2 changes: 2 additions & 0 deletions src/ui/contracts_documents/document_action_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ impl DocumentActionScreen {
id,
properties,
owner_id,
creator_id: None,
revision,
created_at: None,
updated_at: None,
Expand Down Expand Up @@ -1412,6 +1413,7 @@ impl DocumentActionScreen {
id: original_doc.id(),
properties,
owner_id: original_doc.owner_id(),
creator_id: original_doc.creator_id(),
revision: new_revision,
created_at: None,
updated_at: None,
Expand Down
Loading
Loading