Don't do a different thing for only one provider

This commit is contained in:
Mark Veidemanis 2022-03-08 21:01:21 +00:00
parent f2c9725fcb
commit 3fba402964
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 8 additions and 8 deletions

View File

@ -262,14 +262,14 @@ class Agora(util.Base):
providers = ["REVOLUT"]
# buy-monero-online, buy-bitcoin-online
# Work around Agora weirdness calling it bitcoins
if len(providers) == 1:
ads = self.agora._api_call(api_method=f"buy-{coin}-online/{currency}/{providers[0]}", query_values={"page": page})
elif len(providers) > 1:
ads = self.agora._api_call(api_method=f"buy-{coin}-online/{currency}", query_values={"page": page})
# with open("pub.json", "a") as f:
# import json
# f.write(json.dumps([page, currency, asset, ads])+"\n")
# f.close()
# if len(providers) == 1:
# ads = self.agora._api_call(api_method=f"buy-{coin}-online/{currency}/{providers[0]}", query_values={"page": page})
# elif len(providers) > 1:
ads = self.agora._api_call(api_method=f"buy-{coin}-online/{currency}", query_values={"page": page})
# with open("pub.json", "a") as f:
# import json
# f.write(json.dumps([page, currency, asset, ads])+"\n")
# f.close()
if ads is None:
return False
if ads is False: