Skip to content

Commit e16934e

Browse files
authored
Merge pull request #2200 from shlee-lab/patch-1
Update keeperBotShutter.ts: Allow - characters in justification field when decoding messages
2 parents 592243f + 9d72238 commit e16934e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contracts/scripts/keeperBotShutter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ const logger = loggerFactory.createLogger(loggerOptions);
3535
const decode = (message: string) => {
3636
const SEPARATOR = "-";
3737
const parts = message.split(SEPARATOR);
38-
if (parts.length !== 3) {
38+
if (parts.length < 3) {
3939
throw Error(`Malformed decrypted message (${message})`);
4040
}
41-
const [choice, salt, justification] = parts;
41+
const [choice, salt, ...rest] = parts;
42+
const justification = rest.join(SEPARATOR);
43+
4244
return {
4345
choice: BigInt(choice),
4446
salt,

0 commit comments

Comments
 (0)