Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error on source mdia #429

Merged
merged 9 commits into from
Dec 11, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix errors
  • Loading branch information
josediegorobles committed Dec 7, 2023
commit 927314260b51c1e26439d05e60902267ff0f50ee
6 changes: 3 additions & 3 deletions src/bitcoin/payment.rs
Original file line number Diff line number Diff line change
@@ -93,9 +93,9 @@ pub async fn create_payjoin(
.into_iter()
.enumerate()
.find(|(_, txo)| {
invoices.iter().all(|invoice| {
txo.script_pubkey != invoice.address.script_pubkey()
})
invoices
.iter()
.all(|invoice| txo.script_pubkey != invoice.address.script_pubkey())
})
.map(|(i, _)| i);

7 changes: 3 additions & 4 deletions src/web.rs
Original file line number Diff line number Diff line change
@@ -384,9 +384,8 @@ pub mod rgb {
let pre_req: IssuePreRequest = serde_wasm_bindgen::from_value(request).unwrap();
let media = match pre_req.meta {
Some(media) => {
let media = serde_wasm_bindgen::to_value(&media).expect("");
let media = resolve(import_uda_data(media)).await;
Some(IssueMediaRequest::from(media))
let media = crate::rgb::import_uda_data(media).await;
Some(IssueMediaRequest::from(media.unwrap()))
}
None => None,
};
@@ -398,7 +397,7 @@ pub mod rgb {
precision: pre_req.precision,
seal: pre_req.seal,
iface: pre_req.iface,
meta: Some(media),
meta: media,
};
match crate::rgb::issue_contract(&nostr_hex_sk, req).await {
Ok(result) => Ok(JsValue::from_string(