Skip to content

Commit

Permalink
fix: remove payer_amount_sat and receiver_amount_sat from updated…
Browse files Browse the repository at this point in the history
… fields
  • Loading branch information
hydra-yse committed Jan 1, 2025
1 parent 7001931 commit 4fb0fc8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions lib/core/src/persist/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ impl Persister {
"UPDATE chain_swaps
SET
description = :description,
payer_amount_sat = :payer_amount_sat,
receiver_amount_sat = :receiver_amount_sat,
accept_zero_conf = :accept_zero_conf,
server_lockup_tx_id = :server_lockup_tx_id,
user_lockup_tx_id = :user_lockup_tx_id,
Expand All @@ -78,8 +76,6 @@ impl Persister {
named_params! {
":id": &chain_swap.id,
":description": &chain_swap.description,
":payer_amount_sat": &chain_swap.payer_amount_sat,
":receiver_amount_sat": &chain_swap.receiver_amount_sat,
":accept_zero_conf": &chain_swap.accept_zero_conf,
":server_lockup_tx_id": &chain_swap.server_lockup_tx_id,
":user_lockup_tx_id": &chain_swap.user_lockup_tx_id,
Expand Down
8 changes: 0 additions & 8 deletions lib/core/src/sync/model/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ impl ChainSyncData {
pub(crate) fn merge(&mut self, other: &Self, updated_fields: &[String]) {
for field in updated_fields {
match field.as_str() {
"payer_amount_sat" => self.payer_amount_sat = other.payer_amount_sat,
"receiver_amount_sat" => self.receiver_amount_sat = other.receiver_amount_sat,
"accept_zero_conf" => self.accept_zero_conf = other.accept_zero_conf,
_ => continue,
}
Expand All @@ -48,12 +46,6 @@ impl ChainSyncData {
if update.accept_zero_conf != swap.accept_zero_conf {
updated_fields.push("accept_zero_conf".to_string());
}
if update.payer_amount_sat != swap.payer_amount_sat {
updated_fields.push("payer_amount_sat".to_string());
}
if update.receiver_amount_sat != swap.receiver_amount_sat {
updated_fields.push("receiver_amount_sat".to_string());
}
Some(updated_fields)
}
None => None,
Expand Down

0 comments on commit 4fb0fc8

Please sign in to comment.