Skip to content

Commit 28a717b

Browse files
authored
Update split_payments.py
1 parent d4cc3c6 commit 28a717b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

pylnbits/split_payments.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ async def get_target_wallets(self):
4848
4949
"""
5050
try:
51-
upath = self.splitpath
52-
path = self._lnbits_url + upath
51+
path = self._lnbits_url + self.splitpath
5352
res = await get_url(self._session, path=path, headers=self._admin_headers)
5453
return res
5554
except Exception as e:
@@ -71,8 +70,7 @@ async def add_target_wallet(self, wallet: str, alias: str, percent: float):
7170
`percent` can up to 6 decimal places
7271
"""
7372
try:
74-
upath = self.splitpath
75-
path = self._lnbits_url + upath
73+
path = self._lnbits_url + self.splitpath
7674

7775
# check if there are other targets to avoid overwriting
7876
targets = await self.get_target_wallets()
@@ -104,11 +102,10 @@ async def delete_target_wallets(self):
104102
200 OK
105103
"""
106104
try:
107-
upath = self.splitpath
108-
path = self._lnbits_url + upath
105+
path = self._lnbits_url + self.splitpath
109106
res = await delete_url(self._session, path=path, headers=self._admin_headers)
110107
# response body is null when successful.
111108
return res
112109
except Exception as e:
113110
logger.info(e)
114-
return e
111+
return e

0 commit comments

Comments
 (0)