Fix LBTC POST message signing

This commit is contained in:
2022-05-10 21:41:16 +01:00
parent 644444c02f
commit b2b7b3b923
4 changed files with 37 additions and 22 deletions

View File

@@ -58,7 +58,11 @@ class AgoraDesk:
@inlineCallbacks
def callback_api_call(self, response, result):
logger.debug(response)
text = yield response.content()
try:
text = yield response.content()
except: # noqa
self.log.error(f"Error with API call")
return
try:
result["response"] = json.loads(text)
except json.decoder.JSONDecodeError:

View File

@@ -169,7 +169,7 @@ class LocalBitcoins:
response = treq.post(
api_call_url,
headers=headers,
data=json.dumps(query_values),
data=query_values,
)
else:
# response = httpx.post(
@@ -581,7 +581,6 @@ class LocalBitcoins:
params["reference_type"] = reference_type
if display_reference is not None:
params["display_reference"] = display_reference
return self._api_call(
api_method=f"api/ad/{ad_id}/",
http_method="POST",