Skip to content

Commit

Permalink
Log the prepare asset_id
Browse files Browse the repository at this point in the history
  • Loading branch information
dangeross committed Jan 24, 2025
1 parent 87d3885 commit b75822a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/core/src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1916,13 +1916,18 @@ impl LiquidSdk {
debug!("Preparing Chain Receive Swap with: payer_amount_sat {payer_amount_sat:?}, fees_sat {fees_sat}");
}
PaymentMethod::LiquidAddress => {
let payer_amount_sat = match req.amount {
Some(ReceiveAmount::Asset { payer_amount, .. }) => payer_amount,
Some(ReceiveAmount::Bitcoin { payer_amount_sat }) => Some(payer_amount_sat),
None => None,
let (asset_id, amount_sat) = match req.amount.clone() {
Some(ReceiveAmount::Asset {
payer_amount,
asset_id,
}) => (asset_id, payer_amount),
Some(ReceiveAmount::Bitcoin { payer_amount_sat }) => {
(self.config.lbtc_asset_id(), Some(payer_amount_sat))
}
None => (self.config.lbtc_asset_id(), None),
};
fees_sat = 0;
debug!("Preparing Liquid Receive with: amount_sat {payer_amount_sat:?}, fees_sat {fees_sat}");
debug!("Preparing Liquid Receive with: asset_id {asset_id}, amount_sat {amount_sat:?}, fees_sat {fees_sat}");
}
};

Expand Down

0 comments on commit b75822a

Please sign in to comment.