1
0

reverse swaps: in the CLI, replace 'server_mining_fee' with

'prepayment', which corresponds to the trusted part of the
lightning payment.

We use 2*sm.mining_fee, where 'mining_fee' is the flat part of
the server fee. However, future protocol should probably allow
to set a value that does not depend on 'mining_fee'.
(note that LND uses a hardcoded amount).
This commit is contained in:
ThomasV
2025-08-21 17:38:31 +02:00
parent 139508e2b4
commit 864932c79a
6 changed files with 25 additions and 25 deletions

View File

@@ -719,7 +719,7 @@ class QESwapHelper(AuthMixin, QObject, QtEventListener):
transport=self.swap_transport,
lightning_amount_sat=lightning_amount,
expected_onchain_amount_sat=onchain_amount + swap_manager.get_fee_for_txbatcher(),
server_mining_fee_sat=self.serverMiningfee.satsInt,
prepayment_sat=2 * self.serverMiningfee.satsInt,
)
try: # swaphelper might be destroyed at this point
if txid:

View File

@@ -338,7 +338,7 @@ class SwapDialog(WindowModalDialog, QtEventListener):
transport=transport,
lightning_amount_sat=lightning_amount,
expected_onchain_amount_sat=onchain_amount + self.swap_manager.get_fee_for_txbatcher(),
server_mining_fee_sat=self.last_server_mining_fee_sat,
prepayment_sat=2 * self.last_server_mining_fee_sat,
)
try:
# we must not leave the context, so we use run_couroutine_dialog