Browse Source

Save Bitcoin amount `as_sat` in db

The DLC does not concern the UI, hence the amounts should be handles in satoshi.

Note: This commit enforces db reset of CFDs that are stored in `as_btc`.
temporary-fast-timelocks
Daniel Karzel 3 years ago
parent
commit
b470a9d4fc
No known key found for this signature in database GPG Key ID: 30C3FC2E438ADB6E
  1. 4
      daemon/src/model/cfd.rs

4
daemon/src/model/cfd.rs

@ -1367,9 +1367,9 @@ pub struct Dlc {
pub cets: HashMap<OracleEventId, Vec<Cet>>,
pub refund: (Transaction, Signature),
#[serde(with = "::bdk::bitcoin::util::amount::serde::as_btc")]
#[serde(with = "::bdk::bitcoin::util::amount::serde::as_sat")]
pub maker_lock_amount: Amount,
#[serde(with = "::bdk::bitcoin::util::amount::serde::as_btc")]
#[serde(with = "::bdk::bitcoin::util::amount::serde::as_sat")]
pub taker_lock_amount: Amount,
pub revoked_commit: Vec<RevokedCommit>,

Loading…
Cancel
Save