Finish implementation and tests for the cheat system #3

Closed
m wants to merge 67 commits from cheat-refactor into master
1 changed files with 59 additions and 55 deletions
Showing only changes of commit 862a1fa28b - Show all commits

View File

@ -7,7 +7,7 @@ from twisted.internet.threads import deferToThread
from json import loads
from forex_python.converter import CurrencyRates
from agoradesk_py import AgoraDesk
from httpx import ReadTimeout
from httpx import ReadTimeout, ReadError
from pycoingecko import CoinGeckoAPI
from datetime import datetime
@ -186,7 +186,10 @@ class Agora(object):
Get recent messages.
"""
messages_tmp = {}
try:
messages = self.agora.recent_messages()
except ReadError:
return False
if not messages["success"]:
return False
if "data" not in messages["response"]:
@ -487,7 +490,8 @@ class Agora(object):
# Remove extra tabs
ad = ad.replace("\\t", "\t")
form = {"country_code": countrycode,
form = {
"country_code": countrycode,
"currency": currency,
"trade_type": "ONLINE_SELL",
"asset": asset,