mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 09:21:39 +00:00
reverse swap: check that received amount is higher than dust threshold
This commit is contained in:
parent
6d67e77136
commit
5f7d8cc462
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,6 @@ from .lnutil import hex_to_bytes
|
|||
from .json_db import StoredObject
|
||||
from . import constants
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .network import Network
|
||||
from .wallet import Abstract_Wallet
|
||||
|
@ -400,6 +399,8 @@ class SwapManager(Logger):
|
|||
x = int(x * (100 - self.percentage) / 100)
|
||||
x -= self.lockup_fee
|
||||
x -= self.get_claim_fee()
|
||||
if x < dust_threshold():
|
||||
return
|
||||
else:
|
||||
x -= self.normal_fee
|
||||
x = int(x * (100 - self.percentage) / 100)
|
||||
|
|
Loading…
Add table
Reference in a new issue