diff --git a/src/rows.rs b/src/rows.rs index 462e87d..f2a670d 100644 --- a/src/rows.rs +++ b/src/rows.rs @@ -109,6 +109,7 @@ pub struct TxRow { pub height: TxStatus, // TODO: Add date/time pub operation: OpType, + pub our_inputs: Vec, pub counterparties: Vec<(Counterparty, i64)>, pub own: Vec<(DerivedAddr, i64)>, pub txid: Txid, @@ -164,6 +165,12 @@ impl WalletCache { let mut row = TxRow { height: tx.status.map(|info| info.height), operation: OpType::Credit, + our_inputs: tx + .inputs + .iter() + .enumerate() + .filter_map(|(idx, inp)| inp.derived_addr().map(|_| idx as u32)) + .collect(), counterparties: none!(), own: none!(), txid: tx.txid,