Skip to content

Commit 5dac5fc

Browse files
authored
fix: fix the nosign policy validation wrong check (#530)
fix:fix the nosign policy validation wrong check Signed-off-by: Chen Kai <[email protected]>
1 parent 2234bfa commit 5dac5fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/buildRawMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export async function validateToRawMessage (
9191
case StrictNoSign:
9292
if (msg.signature != null) return { valid: false, error: ValidateError.SignaturePresent }
9393
if (msg.seqno != null) return { valid: false, error: ValidateError.SeqnoPresent }
94-
if (msg.key != null) return { valid: false, error: ValidateError.FromPresent }
94+
if (msg.from != null) return { valid: false, error: ValidateError.FromPresent }
9595

9696
return { valid: true, message: { type: 'unsigned', topic: msg.topic, data: msg.data ?? new Uint8Array(0) } }
9797

0 commit comments

Comments
 (0)