@@ -704,9 +704,26 @@ def handle_dcl_points():
704
704
705
705
@app .route ('/get-fee-by-account' , methods = ['GET' ])
706
706
def handle_fee_by_account ():
707
- ret_data = {}
708
707
pool_id = request .args .get ("pool_id" )
709
708
account_id = request .args .get ("account_id" )
709
+ ret_data = handel_account_fee (pool_id , account_id )
710
+ return compress_response_content (ret_data )
711
+
712
+
713
+ @app .route ('/batch-get-fee-by-account' , methods = ['GET' ])
714
+ def handle_batch_fee_by_account ():
715
+ ret_data = []
716
+ pool_ids = request .args .get ("pool_ids" )
717
+ account_id = request .args .get ("account_id" )
718
+ pool_id_list = pool_ids .split ("," )
719
+ for pool_id in pool_id_list :
720
+ ret = handel_account_fee (pool_id , account_id )
721
+ ret_data .append (ret )
722
+ return compress_response_content (ret_data )
723
+
724
+
725
+ def handel_account_fee (pool_id , account_id ):
726
+ ret_data = {}
710
727
if pool_id is None or account_id is None :
711
728
return "null"
712
729
# unclaimed_fee_data = query_dcl_user_unclaimed_fee(Cfg.NETWORK_ID, pool_id, account_id)
@@ -796,7 +813,7 @@ def handle_fee_by_account():
796
813
"user_token" : user_token ,
797
814
"change_log_data" : ret_change_log_data
798
815
}
799
- return compress_response_content ( ret_data )
816
+ return ret_data
800
817
801
818
802
819
@app .route ('/get-dcl-points-by-account' , methods = ['GET' ])
0 commit comments