Skip to content

Commit

Permalink
add total
Browse files Browse the repository at this point in the history
  • Loading branch information
zancas committed Jan 21, 2025
1 parent a028ad3 commit 621a739
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zingolib/src/lightclient/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,9 @@ impl LightClient {
/// TODO: doc comment
pub async fn value_transfers_json_string(&self, recent_vts_to_retrieve: usize) -> String {
let sorted_vts = self.sorted_value_transfers(true).await;
let total = sorted_vts.len();
let subset = &sorted_vts.as_slice()[..recent_vts_to_retrieve];
json::JsonValue::from(subset).pretty(2)
object! {"value_transfers:"=> subset, "total" => total}.to_string()
}

/// Provides a list of transaction summaries related to this wallet in order of blockheight
Expand Down

0 comments on commit 621a739

Please sign in to comment.