|
|
@ -1,4 +1,5 @@ |
|
|
|
import asyncio |
|
|
|
import math |
|
|
|
from typing import Union |
|
|
|
|
|
|
|
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject |
|
|
@ -242,7 +243,8 @@ class QESwapHelper(AuthMixin, QObject): |
|
|
|
|
|
|
|
# fee breakdown |
|
|
|
self.serverfeeperc = f'{swap_manager.percentage:0.1f}%' |
|
|
|
self.serverfee = QEAmount(amount_sat=swap_manager.lockup_fee) |
|
|
|
serverfee = math.ceil(swap_manager.percentage * pay_amount / 100) + swap_manager.lockup_fee |
|
|
|
self.serverfee = QEAmount(amount_sat=serverfee) |
|
|
|
self.miningfee = QEAmount(amount_sat=swap_manager.get_claim_fee()) |
|
|
|
|
|
|
|
else: # forward (normal) swap |
|
|
@ -261,7 +263,8 @@ class QESwapHelper(AuthMixin, QObject): |
|
|
|
|
|
|
|
# fee breakdown |
|
|
|
self.serverfeeperc = f'{swap_manager.percentage:0.1f}%' |
|
|
|
self.serverfee = QEAmount(amount_sat=swap_manager.normal_fee) |
|
|
|
serverfee = math.ceil(swap_manager.percentage * pay_amount / 100) + swap_manager.normal_fee |
|
|
|
self.serverfee = QEAmount(amount_sat=serverfee) |
|
|
|
self.miningfee = QEAmount(amount_sat=self._tx.get_fee()) if self._tx else QEAmount() |
|
|
|
|
|
|
|
if pay_amount and receive_amount: |
|
|
|