We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f4c88 commit 588911cCopy full SHA for 588911c
crates/nostr/src/nips/nip47.rs
@@ -725,12 +725,9 @@ impl Response {
725
}
726
Method::ListTransactions => {
727
let transactions: Value =
728
- result
729
- .get("transactions")
730
- .cloned()
731
- .ok_or(Error::UnexpectedResult(String::from(
732
- "Missing 'transactions' field",
733
- )))?;
+ result.get("transactions").cloned().ok_or_else(|| {
+ Error::UnexpectedResult(String::from("Missing 'transactions' field"))
+ })?;
734
let result: Vec<LookupInvoiceResponseResult> =
735
serde_json::from_value(transactions)?;
736
ResponseResult::ListTransactions(result)
0 commit comments