diff --git a/daemon/src/model/cfd.rs b/daemon/src/model/cfd.rs index 0c5d09f..a4bc67d 100644 --- a/daemon/src/model/cfd.rs +++ b/daemon/src/model/cfd.rs @@ -291,6 +291,7 @@ pub struct Attestation { #[serde(with = "::bdk::bitcoin::util::amount::serde::as_sat")] payout: Amount, price: u64, + txid: Txid, } impl Attestation { @@ -307,6 +308,8 @@ impl Attestation { .find_map(|(_, cet)| cet.iter().find(|cet| cet.range.contains(&price))) .context("Unable to find attested price in any range")?; + let txid = cet.tx.txid(); + let payout = cet .tx .output @@ -326,6 +329,7 @@ impl Attestation { price, scalars, payout, + txid, }) }