diff --git a/moonstreamapi/moonstreamapi/actions.py b/moonstreamapi/moonstreamapi/actions.py index 31eb4c6c..13d4d0e6 100644 --- a/moonstreamapi/moonstreamapi/actions.py +++ b/moonstreamapi/moonstreamapi/actions.py @@ -850,17 +850,6 @@ def get_list_of_support_interfaces( """ try: - web3_client = connect(blockchain_type, user_token=user_token) - - # GET LAST BLOCK - - print("web3_client", web3_client.eth.get_block("latest")) - - contract = web3_client.eth.contract( - address=Web3.toChecksumAddress(address), - abi=supportsInterface_abi, - ) - _, _, is_contract = check_if_smart_contract( blockchain_type=blockchain_type, address=address, user_token=user_token ) @@ -868,6 +857,13 @@ def get_list_of_support_interfaces( if not is_contract: raise AddressNotSmartContractException(f"Address not are smart contract") + web3_client = connect(blockchain_type, user_token=user_token) + + contract = web3_client.eth.contract( + address=Web3.toChecksumAddress(address), + abi=supportsInterface_abi, + ) + result = {} if blockchain_type in multicall_contracts: diff --git a/moonstreamapi/moonstreamapi/routes/subscriptions.py b/moonstreamapi/moonstreamapi/routes/subscriptions.py index a1874b64..af4977af 100644 --- a/moonstreamapi/moonstreamapi/routes/subscriptions.py +++ b/moonstreamapi/moonstreamapi/routes/subscriptions.py @@ -650,7 +650,7 @@ async def list_subscription_types() -> data.SubscriptionTypesListResponse: ) async def get_subscription_jobs_handler( request: Request, - subscription_id: str, + subscription_id: str = Path(...), ) -> Any: token = request.state.token user = request.state.user