Skip to content

Commit 85ac61c

Browse files
committed
chore: remove schema limits for tag/content
Signed-off-by: Ricardo Arturo Cabral Mejía <[email protected]>
1 parent 205be2c commit 85ac61c

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/schemas/event-schema.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ export const eventSchema = Schema.object({
3232
pubkey: pubkeySchema.required(),
3333
created_at: Schema.number().min(0).multiple(1).custom(seconds).required(),
3434
kind: kindSchema.required(),
35-
tags: Schema.array().items(tagSchema).max(500).required(),
35+
tags: Schema.array().items(tagSchema).required(),
3636
content: Schema.string()
37-
.max(64 * 1024) // 64 kB
3837
.allow('')
3938
.required(),
4039
sig: signatureSchema.required(),

test/unit/schemas/event-schema.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ describe('NIP-01', () => {
9797
],
9898
content: [
9999
{ message: 'must be a string', transform: assocPath(['content'], null) },
100-
{ message: 'length must be less than or equal to 65536 characters long', transform: assocPath(['content'], ' '.repeat(64 * 1024 + 1)) },
101100
{ message: 'is required', transform: omit(['content']) },
102101
],
103102
sig: [
@@ -112,7 +111,6 @@ describe('NIP-01', () => {
112111
tags: [
113112
{ message: 'must be an array', transform: assocPath(['tags'], null) },
114113
{ message: 'is required', transform: omit(['tags']) },
115-
{ message: 'must contain less than or equal to 500 items', transform: assocPath(['tags'], range(0, 501).map(() => (['x', 'x']))) },
116114
],
117115
tag: [
118116
{ message: 'must be an array', transform: assocPath(['tags', 0], null) },

0 commit comments

Comments
 (0)