From 42d63bdd5a68634d82346b0424cca92e0db6c15d Mon Sep 17 00:00:00 2001 From: Gift-Naomi Date: Sun, 2 Jun 2024 14:43:38 +0100 Subject: [PATCH] refac: modify `ADDRESS_REGEX` and `MAX_LENGTH` --- backend/src/ipfs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/ipfs.ts b/backend/src/ipfs.ts index 3f840e68..d293552d 100644 --- a/backend/src/ipfs.ts +++ b/backend/src/ipfs.ts @@ -10,8 +10,8 @@ interface Proposal { starknet_id?: string; } -const ADDRES_REGEX: RegExp = /^0x0[0-9a-fA-F]{63}$/; -const MAX_LENGTH: number = 200; +const ADDRES_REGEX: RegExp = /^0x[0-9a-fA-F]+$/; +const MAX_LENGTH: number = 10000; const PINATA_JWT: string = process.env.PINATA_JWT || ""; const pinToIPFS = async (proposal: Proposal) => {