From 975d85657097d1232df542067ce7ae2af0b93722 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Mon, 17 Apr 2023 10:09:53 +0000 Subject: [PATCH] API route fix for smartContractDeposits --- ranchimallflo_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ranchimallflo_api.py b/ranchimallflo_api.py index bbc0a3a..7137727 100644 --- a/ranchimallflo_api.py +++ b/ranchimallflo_api.py @@ -1943,7 +1943,7 @@ async def smartcontracttransactions(): # todo - add options to only ask for active/consumed/returned deposits -@app.route('/api/v2/smartContractDeposits/', methods=['GET']) +@app.route('/api/v2/smartContractDeposits', methods=['GET']) async def smartcontractdeposits(): # todo - put validation for transactionHash contractName = request.args.get('contractName') @@ -1966,8 +1966,7 @@ async def smartcontractdeposits(): c = conn.cursor() c.execute('''SELECT depositorAddress, transactionHash, status, depositBalance FROM contractdeposits WHERE (transactionHash, id) IN (SELECT transactionHash, MAX(id) FROM contractdeposits GROUP BY transactionHash) - ORDER BY id DESC - ;''') + ORDER BY id DESC; ''') distinct_deposits = c.fetchall() deposit_info = []