diff --git a/src/constants.ts b/src/constants.ts index 23dbd65..abf65ce 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -17,8 +17,6 @@ import { EvaluationOptions } from 'warp-contracts'; export const ARNS_CONTRACT_ID_REGEX = '([a-zA-Z0-9-_s+]{43})'; -export const ARNS_CONTRACT_FIELD_REGEX = - '(balances|fees|ticker|owner|name|controller|auctions|settings|reserved|gateways|version|lastTickedState|demandFactoring)'; export const ARNS_NAME_REGEX = '([a-zA-Z0-9-s+]{1,51})'; export const EVALUATION_TIMEOUT_MS = 10_000; // 10 sec state timeout export const allowedContractTypes = ['ant'] as const; diff --git a/src/router.ts b/src/router.ts index a77caf1..b4bdba8 100644 --- a/src/router.ts +++ b/src/router.ts @@ -15,11 +15,7 @@ * along with this program. If not, see . */ import Router from '@koa/router'; -import { - ARNS_CONTRACT_FIELD_REGEX, - ARNS_CONTRACT_ID_REGEX, - ARNS_NAME_REGEX, -} from './constants'; +import { ARNS_CONTRACT_ID_REGEX, ARNS_NAME_REGEX } from './constants'; import { contractBalanceHandler, contractFieldHandler, @@ -104,7 +100,7 @@ router.get( ); // fallback for any other contract fields that don't include additional logic (i.e. this just returns partial contract state) router.get( - `/v1/contract/:contractTxId${ARNS_CONTRACT_ID_REGEX}/:field${ARNS_CONTRACT_FIELD_REGEX}`, + `/v1/contract/:contractTxId${ARNS_CONTRACT_ID_REGEX}/:field`, contractFieldHandler, ); router.get(