From c028281324c85da4caf3a1eb0b2ce08222bb5daf Mon Sep 17 00:00:00 2001 From: lAmeR1 <42315864+lAmeR1@users.noreply.github.com> Date: Wed, 15 Feb 2023 00:04:51 +0100 Subject: [PATCH] ECDSA addresses are longer (#17) --- endpoints/get_address_transactions.py | 6 +++--- endpoints/get_balance.py | 2 +- endpoints/get_utxos.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/endpoints/get_address_transactions.py b/endpoints/get_address_transactions.py index 823b451..bafcfb6 100644 --- a/endpoints/get_address_transactions.py +++ b/endpoints/get_address_transactions.py @@ -33,7 +33,7 @@ async def get_transactions_for_address( kaspaAddress: str = Path( description="Kaspa address as string e.g. " "kaspa:pzhh76qc82wzduvsrd9xh4zde9qhp0xc8rl7qu2mvl2e42uvdqt75zrcgpm00", - regex="^kaspa\:[a-z0-9]{61}$")): + regex="^kaspa\:[a-z0-9]{61,63}$")): """ Get all transactions for a given address from database """ @@ -76,7 +76,7 @@ async def get_full_transactions_for_address( kaspaAddress: str = Path( description="Kaspa address as string e.g. " "kaspa:pzhh76qc82wzduvsrd9xh4zde9qhp0xc8rl7qu2mvl2e42uvdqt75zrcgpm00", - regex="^kaspa\:[a-z0-9]{61}$"), + regex="^kaspa\:[a-z0-9]{61,63}$"), limit: int = Query( description="The number of records to get", ge=1, @@ -114,7 +114,7 @@ async def get_transaction_count_for_address( kaspaAddress: str = Path( description="Kaspa address as string e.g. " "kaspa:pzhh76qc82wzduvsrd9xh4zde9qhp0xc8rl7qu2mvl2e42uvdqt75zrcgpm00", - regex="^kaspa\:[a-z0-9]{61}$") + regex="^kaspa\:[a-z0-9]{61,63}$") ): """ Count the number of transactions associated with this address diff --git a/endpoints/get_balance.py b/endpoints/get_balance.py index 60aec1d..6ccd08a 100644 --- a/endpoints/get_balance.py +++ b/endpoints/get_balance.py @@ -15,7 +15,7 @@ class BalanceResponse(BaseModel): async def get_balance_from_kaspa_address( kaspaAddress: str = Path( description="Kaspa address as string e.g. kaspa:pzhh76qc82wzduvsrd9xh4zde9qhp0xc8rl7qu2mvl2e42uvdqt75zrcgpm00", - regex="^kaspa\:[a-z0-9]{61}$")): + regex="^kaspa\:[a-z0-9]{61,63}$")): """ Get balance for a given kaspa address """ diff --git a/endpoints/get_utxos.py b/endpoints/get_utxos.py index 34262ec..1f9ce9e 100644 --- a/endpoints/get_utxos.py +++ b/endpoints/get_utxos.py @@ -32,7 +32,7 @@ class UtxoResponse(BaseModel): @app.get("/addresses/{kaspaAddress}/utxos", response_model=List[UtxoResponse], tags=["Kaspa addresses"]) async def get_utxos_for_address(kaspaAddress: str = Path( description="Kaspa address as string e.g. kaspa:qqkqkzjvr7zwxxmjxjkmxxdwju9kjs6e9u82uh59z07vgaks6gg62v8707g73", - regex="^kaspa\:[a-z0-9]{61}$")): + regex="^kaspa\:[a-z0-9]{61,63}$")): """ Lists all open utxo for a given kaspa address """