1
0

fix: use eta:2 as funding tx fee policy in qml swap

qml used the user config fee policy for the forward swap onchain funding
tx which can be too high or low, depending on what transactions the user
did previously with the wallet. Setting it to eta:2 ensures that the
funding tx is paying a sane fee.
This commit is contained in:
f321x
2025-06-09 15:09:30 +02:00
parent 27599ac537
commit 4849d4d770

View File

@@ -543,7 +543,7 @@ class QESwapHelper(AuthMixin, QObject, QtEventListener):
return
outputs = [PartialTxOutput.from_address_and_value(DummyAddress.SWAP, onchain_amount)]
coins = self._wallet.wallet.get_spendable_coins(None)
fee_policy = FeePolicy(self._wallet.wallet.config.FEE_POLICY)
fee_policy = FeePolicy('eta:2')
try:
self._tx = self._wallet.wallet.make_unsigned_transaction(
coins=coins,
@@ -677,7 +677,7 @@ class QESwapHelper(AuthMixin, QObject, QtEventListener):
if max_amount > max_swap_amount:
onchain_amount = max_swap_amount
outputs = [PartialTxOutput.from_address_and_value(DummyAddress.SWAP, onchain_amount)]
fee_policy = FeePolicy(self._wallet.wallet.config.FEE_POLICY)
fee_policy = FeePolicy('eta:2')
try:
tx = self._wallet.wallet.make_unsigned_transaction(
coins=coins,