[fix] bandit assert warnings (#3243)
Co-authored-by: dni ⚡ <office@dnilabs.com>
This commit is contained in:
@@ -142,7 +142,8 @@ class BoltzWallet(Wallet):
|
||||
pair_info = await self.rpc.GetPairInfo(pair_request, metadata=self.metadata)
|
||||
invoice = decode(bolt11)
|
||||
|
||||
assert invoice.amount_msat, "amountless invoice"
|
||||
if not invoice.amount_msat:
|
||||
raise ValueError("amountless invoice")
|
||||
service_fee: float = invoice.amount_msat * pair_info.fees.percentage / 100
|
||||
estimate = service_fee + pair_info.fees.miner_fees * 1000
|
||||
if estimate > fee_limit_msat:
|
||||
|
||||
Reference in New Issue
Block a user