add donation address

pull/26/head
lza_menace 2 years ago
parent 2fb28e90fb
commit 4b9e4591c3

@ -1,10 +1,32 @@
requests
flask
peewee
gunicorn
arrow
flask_wtf
pysocks
git+https://github.com/cdiv1e12/py-levin
geoip2
python-dotenv
aiohttp==3.8.4
aiosignal==1.3.1
arrow==1.2.3
async-timeout==4.0.2
attrs==22.2.0
certifi==2022.12.7
charset-normalizer==3.1.0
click==8.1.3
Flask==2.2.3
Flask-WTF==1.1.1
frozenlist==1.3.3
geoip2==4.6.0
gunicorn==20.1.0
idna==3.4
importlib-metadata==6.1.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.2
maxminddb==2.2.0
multidict==6.0.4
peewee==3.16.0
py-levin==0.1.0
PySocks==1.7.1
python-dateutil==2.8.2
python-dotenv==1.0.0
requests==2.28.2
six==1.16.0
urllib3==1.26.15
Werkzeug==2.2.3
WTForms==3.0.1
yarl==1.8.2
zipp==3.15.0

@ -37,6 +37,8 @@ def check():
assert "status" in r.json()
assert "offline" in r.json()
assert "height" in r.json()
if 'donation_address' in r.json():
node.donation_address = r.json()['donation_address']
has_cors = "Access-Control-Allow-Origin" in r.headers
is_ssl = node.url.startswith("https://")
if r.json()["status"] == "OK":

@ -20,6 +20,7 @@ class Node(Model):
nettype = CharField(null=True)
last_height = IntegerField(null=True)
crypto = CharField(null=True)
donation_address = CharField(null=True)
datetime_entered = DateTimeField(default=datetime.utcnow)
datetime_checked = DateTimeField(default=None, null=True)
datetime_failed = DateTimeField(default=None, null=True)

@ -101,7 +101,6 @@
<th class="js-sort-none">Up</th>
<th class="js-sort-none">Web<br/>Compatible</th>
<th class="js-sort-none">Network</th>
<th class="js-sort-none">Date Added</th>
<th class="js-sort-none">Last Checked</th>
<th class="js-sort-none">History</th>
</tr>
@ -126,7 +125,6 @@
{% endif %}
</td>
<td>{{ node.nettype }}</td>
<td>{{ node.datetime_entered | humanize }}</td>
<td>{{ node.datetime_checked | humanize }}</td>
<td>{% for hc in node.healthchecks %}
{% if loop.index > loop.length - 6 %}

Loading…
Cancel
Save