22
33import uvicorn
44
5- from src import app
65from src .chain .kvstore import register_in_kvstore
76from src .core .config import Config
87
@@ -16,7 +15,8 @@ def apply_local_development_patches():
1615 using mock data if the address corresponds to a local manifest.
1716 - Updates local manifest files from cloud storage.
1817 - Overrides `validate_address` to disable address validation.
19- - Replaces `validate_oracle_webhook_signature` with a lenient version for oracle signature validation in development.
18+ - Replaces `validate_oracle_webhook_signature` with a lenient version for oracle signature
19+ validation in development.
2020 """
2121 from human_protocol_sdk .constants import ChainId
2222 from human_protocol_sdk .escrow import EscrowData , EscrowUtils
@@ -34,9 +34,9 @@ def get_local_escrow(chain_id: int, escrow_address: str) -> EscrowData:
3434 factory_address = "" ,
3535 launcher = "" ,
3636 status = "Pending" ,
37- token = "HMT" ,
37+ token = "HMT" , # noqa: S106
3838 total_funded_amount = 10 ,
39- created_at = datetime .datetime (2023 , 1 , 1 ),
39+ created_at = datetime .datetime (2023 , 1 , 1 , tzinfo = datetime . timezone . utc ),
4040 manifest_url = f"http://127.0.0.1:9010/manifests/{ possible_manifest_name } " ,
4141 )
4242 return original_get_escrow (ChainId (chain_id ), escrow_address )
@@ -66,6 +66,7 @@ async def lenient_validate_oracle_webhook_signature(request, signature, webhook)
6666 return await validate_oracle_webhook_signature (request , signature , webhook )
6767
6868 import src .endpoints .webhook
69+
6970 src .endpoints .webhook .validate_oracle_webhook_signature = (
7071 lenient_validate_oracle_webhook_signature
7172 )
0 commit comments