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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user