diff --git a/package.json b/package.json index 8ae0173..8406691 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ssv-keys", - "version": "1.0.7", + "version": "1.0.8", "description": "Tool for splitting a validator key into a predefined threshold of shares via Shamir-Secret-Sharing (SSS), and encrypt them with a set of operator keys.", "author": "SSV.Network", "repository": "https://github.com/bloxapp/ssv-keys", diff --git a/src/commands/actions/KeySharesCustomBulkAction.ts b/src/commands/actions/KeySharesCustomBulkAction.ts index b043ff5..0c08cc5 100644 --- a/src/commands/actions/KeySharesCustomBulkAction.ts +++ b/src/commands/actions/KeySharesCustomBulkAction.ts @@ -52,12 +52,6 @@ export class KeySharesCustomBulkAction extends BaseAction { } = this.args; // Now save to key shares file encrypted shares and validator public key - /* - const operators = operatorKeys.map((operatorKey: string, index: number) => ({ - id: operatorIds[index], - operatorKey, - })); - */ const operators = readOperatorsFile(sanitizePath(operatorsFile)); const operatorsDistribution = readOperatorsDistributionFile(sanitizePath(operatorsDistributionFile)); @@ -75,7 +69,7 @@ export class KeySharesCustomBulkAction extends BaseAction { // validate data if (files.length !== operatorGroups.length) { - throw Error(`Files amoumt(${files.length}) is not equal clusters amount(${operatorGroups.length})`); + throw Error(`Files amount(${files.length}) is not equal clusters amount(${operatorGroups.length})`); } // validate all files diff --git a/src/lib/helpers/file.helper.ts b/src/lib/helpers/file.helper.ts index f196d48..deedb05 100644 --- a/src/lib/helpers/file.helper.ts +++ b/src/lib/helpers/file.helper.ts @@ -73,7 +73,7 @@ export const readOperatorsFile = (filePath: string): Map => { const operators = new Map(); lines.forEach(line => { const [id, operatorKey] = line.split(','); - operators.set(Number(id), operatorKey); + operators.set(Number(id), operatorKey.replace(/(\r\n|\n|\r)/gm, '')); }); return operators; }