Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed Nov 7, 2023
1 parent 3396be1 commit ca820d0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions boltz_client/boltz.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import asyncio
from dataclasses import dataclass
from typing import Optional
from math import ceil, floor
from typing import Optional

import httpx

Expand Down Expand Up @@ -142,7 +142,6 @@ def get_fee_estimation(self, feerate: Optional[int]) -> int:
mempool_fees = feerate if feerate else self.mempool.get_fees()
return mempool_fees * tx_size_vbyte


def setup_boltz_config(self) -> None:
data = self.request(
"get",
Expand Down Expand Up @@ -240,7 +239,9 @@ async def claim_reverse_swap(
privkey_wif=privkey_wif,
redeem_script_hex=redeem_script_hex,
preimage_hex=preimage_hex,
fees=self.get_fee_estimation(feerate) if feerate else self.get_fee_estimation_claim(),
fees=self.get_fee_estimation(feerate)
if feerate
else self.get_fee_estimation_claim(),
)
self.mempool.send_onchain_tx(transaction)
return txid
Expand All @@ -265,7 +266,9 @@ async def refund_swap(
receive_address=receive_address,
redeem_script_hex=redeem_script_hex,
timeout_block_height=timeout_block_height,
fees=self.get_fee_estimation(feerate) if feerate else self.get_fee_estimation_refund(),
fees=self.get_fee_estimation(feerate)
if feerate
else self.get_fee_estimation_refund(),
)
self.mempool.send_onchain_tx(transaction)
return txid
Expand Down

0 comments on commit ca820d0

Please sign in to comment.