From eace048dfb32ab131ec27b6cbb46a9bd97de2df9 Mon Sep 17 00:00:00 2001 From: Alexander Whipp Date: Thu, 25 Jul 2024 15:05:32 -0400 Subject: [PATCH] fix: :bug: Updated tax base from 8% to 4.5% --- .github/workflows/check_endpoints.yml | 4 ++-- api/evetrade/hauling.py | 2 +- api/evetrade/station.py | 2 +- tests/test_gateway.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check_endpoints.yml b/.github/workflows/check_endpoints.yml index c3a236b..93e6bae 100644 --- a/.github/workflows/check_endpoints.yml +++ b/.github/workflows/check_endpoints.yml @@ -28,7 +28,7 @@ jobs: - name: Checking Hauling Endpoint run: | - curl -X GET "$HAULING_PROD_API?from=10000002:60003760&to=10000043:60008494&tax=0.08&minProfit=500000&minROI=0.05&maxBudget=99999999999&maxWeight=9999999&routeSafety=secure&systemSecurity=high_sec" | jq + curl -X GET "$HAULING_PROD_API?from=10000002:60003760&to=10000043:60008494&tax=0.045&minProfit=500000&minROI=0.05&maxBudget=99999999999&maxWeight=9999999&routeSafety=secure&systemSecurity=high_sec" | jq - name: Checking Orders Endpoint run: | @@ -36,4 +36,4 @@ jobs: - name: Checking Station Trading Endpoint run: | - curl -X GET "$STATION_PROD_API?station=60003760&profit=1000&tax=0.08&fee=0.03&margins=0.20,0.30&min_volume=100000&volume_filter=1" | jq + curl -X GET "$STATION_PROD_API?station=60003760&profit=1000&tax=0.045&fee=0.03&margins=0.20,0.30&min_volume=100000&volume_filter=1" | jq diff --git a/api/evetrade/hauling.py b/api/evetrade/hauling.py index 4cba89a..e4565de 100644 --- a/api/evetrade/hauling.py +++ b/api/evetrade/hauling.py @@ -327,7 +327,7 @@ async def get(request) -> list: ''' startTime = time.time() queries = request['queryStringParameters'] - SALES_TAX = float(queries.get('tax', 0.08)) + SALES_TAX = float(queries.get('tax', 0.045)) MIN_PROFIT = float(queries.get('minProfit', 500000)) MIN_ROI = float(queries.get('minROI', 0.04)) MAX_BUDGET = float(queries.get('maxBudget', float('inf'))) diff --git a/api/evetrade/station.py b/api/evetrade/station.py index 5f9b3ac..346ec9c 100644 --- a/api/evetrade/station.py +++ b/api/evetrade/station.py @@ -138,7 +138,7 @@ async def get(event: dict) -> list: queries = event['queryStringParameters'] STATION = queries['station'] - SALES_TAX = float(queries.get('tax', 0.08)) + SALES_TAX = float(queries.get('tax', 0.045)) BROKER_FEE = float(queries.get('fee', 0.03)) MARGINS = list(map(float, queries.get('margins', '0.20,0.40').split(','))) MIN_VOLUME = int(queries.get('min_volume', 1000)) diff --git a/tests/test_gateway.py b/tests/test_gateway.py index 154ae2d..78dee9f 100644 --- a/tests/test_gateway.py +++ b/tests/test_gateway.py @@ -59,7 +59,7 @@ def test_get_hauling(mock_boto_sqs) -> None: "queryStringParameters": { "from": "10000002", "to": "10000043", - "tax": 0.08, + "tax": 0.045, "minProfit": 500000, "minROI": 0.05, "routeSafety": "secure", @@ -113,7 +113,7 @@ def test_get_hauling_nearby(mock_boto_sqs) -> None: "queryStringParameters": { "from": "10000002", "to": "nearby", - "tax": 0.08, + "tax": 0.045, "minProfit": 500000, "minROI": 0.05, "routeSafety": "secure", @@ -165,7 +165,7 @@ def test_get_stations() -> None: }, "queryStringParameters": { "station": "60008494", - "tax": "0.08", + "tax": "0.045", "fee": "0.03", "margins": "0.10,0.20", "min_volume": 1000,