From c7d8d3656fa129f5bc141fcb218dfc1886390fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Thu, 2 Nov 2023 18:23:58 +0100 Subject: [PATCH] fixup mempool urls --- boltz_client/boltz.py | 2 +- boltz_client/mempool.py | 2 +- tests/conftest.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boltz_client/boltz.py b/boltz_client/boltz.py index 5975332..e368c6c 100644 --- a/boltz_client/boltz.py +++ b/boltz_client/boltz.py @@ -61,7 +61,7 @@ class BoltzReverseSwapResponse: class BoltzConfig: network: str = "main" api_url: str = "https://boltz.exchange/api" - mempool_url: str = "https://mempool.space/api" + mempool_url: str = "https://mempool.space/api/v1" mempool_ws_url: str = "wss://mempool.space/api/v1/ws" referral_id: str = "dni" diff --git a/boltz_client/mempool.py b/boltz_client/mempool.py index 9273317..5306962 100644 --- a/boltz_client/mempool.py +++ b/boltz_client/mempool.py @@ -116,7 +116,7 @@ async def get_tx_from_address(self, address: str) -> LockupData: def get_fees(self) -> int: data = self.request( "get", - f"{self._api_url}/v1/fees/recommended", + f"{self._api_url}/fees/recommended", headers={"Content-Type": "application/json"}, ) return int(data["halfHourFee"]) diff --git a/tests/conftest.py b/tests/conftest.py index 05b2b78..cf02ef5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,8 +21,8 @@ async def client(): config = BoltzConfig( network="regtest", api_url="http://localhost:9001", - mempool_url="http://localhost:8080/api", - mempool_ws_url="ws://localhost:8080/api/v1/ws", + mempool_url="http://localhost:8999/api/v1", + mempool_ws_url="ws://localhost:8999/api/v1/ws", ) client = BoltzClient(config) yield client