From 4dd9e900da2112b8dc57f9927bf6c17a3899c410 Mon Sep 17 00:00:00 2001 From: Giacomo Licari Date: Mon, 25 Mar 2024 14:23:29 +0100 Subject: [PATCH] add time lock period to info route --- api/api/routes.py | 4 +++- api/api/services/validator.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/api/routes.py b/api/api/routes.py index 4fae7dc..9dbbd7c 100644 --- a/api/api/routes.py +++ b/api/api/routes.py @@ -17,12 +17,14 @@ def status(): @apiv1.route("/info") def info(): enabled_tokens = Token.enabled_tokens() + rate_limit_days = current_app.config['FAUCET_RATE_LIMIT_TIME_LIMIT_SECONDS'] / (24*60) enabled_tokens_json = [ { 'address': t.address, 'name': t.name, 'maximumAmount': t.max_amount_day, - 'type': t.type + 'type': t.type, + 'rateLimitDays': rate_limit_days } for t in enabled_tokens ] return jsonify( diff --git a/api/api/services/validator.py b/api/api/services/validator.py index 9c61252..b7342f2 100644 --- a/api/api/services/validator.py +++ b/api/api/services/validator.py @@ -1,5 +1,4 @@ import datetime -import pdb from flask import current_app, request from web3 import Web3