diff --git a/src/models/accounting_period.py b/src/models/accounting_period.py index ac02a67e..6c36ed21 100644 --- a/src/models/accounting_period.py +++ b/src/models/accounting_period.py @@ -31,7 +31,7 @@ def __hash__(self) -> int: ) def as_query_params(self) -> list[QueryParameter]: - """Returns commonly used (StartTime, EndTime) query parameters""" + """Returns commonly used (start_time, end_time) query parameters""" return [ QueryParameter.date_type("start_time", self.start), QueryParameter.date_type("end_time", self.end), @@ -41,11 +41,11 @@ def dashboard_url(self) -> str: """Constructs Solver Accounting Dashboard URL for Period""" base = "https://dune.com/cowprotocol/" slug = "cow-solver-rewards" - query = f"?StartTime={self.start}&EndTime={self.end}" + query = f"?start_time={self.start}&end_time={self.end}" return base + urllib.parse.quote_plus(slug + query, safe="=&?") def unusual_slippage_url(self) -> str: """Returns a link to unusual slippage query for period""" - base = "https://dune.com/queries/1688044" - query = f"?StartTime={self.start}&EndTime={self.end}" + base = "https://dune.com/queries/2332678" + query = f"?start_time={self.start}&end_time={self.end}" return base + urllib.parse.quote_plus(query, safe="=&?") diff --git a/tests/unit/test_data_utils.py b/tests/unit/test_data_utils.py index 730a5bd1..6fb14210 100644 --- a/tests/unit/test_data_utils.py +++ b/tests/unit/test_data_utils.py @@ -15,8 +15,8 @@ class TestDataUtils(unittest.TestCase): def test_dashboard_url(self): expected = ( "https://dune.com/cowprotocol/cow-solver-rewards?" - "StartTime=2022-05-31+00%3A00%3A00&" - "EndTime=2022-06-07+00%3A00%3A00" + "start_time=2022-05-31+00%3A00%3A00&" + "end_time=2022-06-07+00%3A00%3A00" ) result = AccountingPeriod("2022-05-31").dashboard_url() self.assertEqual(