chore: remove schema limits for tag/content

Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
Ricardo Arturo Cabral Mejía 2022-11-22 19:01:58 -05:00
parent 205be2cf00
commit 85ac61cc93
2 changed files with 1 additions and 4 deletions

View File

@ -32,9 +32,8 @@ export const eventSchema = Schema.object({
pubkey: pubkeySchema.required(),
created_at: Schema.number().min(0).multiple(1).custom(seconds).required(),
kind: kindSchema.required(),
tags: Schema.array().items(tagSchema).max(500).required(),
tags: Schema.array().items(tagSchema).required(),
content: Schema.string()
.max(64 * 1024) // 64 kB
.allow('')
.required(),
sig: signatureSchema.required(),

View File

@ -97,7 +97,6 @@ describe('NIP-01', () => {
],
content: [
{ message: 'must be a string', transform: assocPath(['content'], null) },
{ message: 'length must be less than or equal to 65536 characters long', transform: assocPath(['content'], ' '.repeat(64 * 1024 + 1)) },
{ message: 'is required', transform: omit(['content']) },
],
sig: [
@ -112,7 +111,6 @@ describe('NIP-01', () => {
tags: [
{ message: 'must be an array', transform: assocPath(['tags'], null) },
{ message: 'is required', transform: omit(['tags']) },
{ message: 'must contain less than or equal to 500 items', transform: assocPath(['tags'], range(0, 501).map(() => (['x', 'x']))) },
],
tag: [
{ message: 'must be an array', transform: assocPath(['tags', 0], null) },