fix: spelling error

This commit is contained in:
Johannes Kares
2024-07-16 09:58:59 +02:00
committed by GitHub
parent 64f8aff4fd
commit 4e54238e76

View File

@@ -5,7 +5,7 @@ const SECRET_LENGTH = 64
const lengthToPrefix = { 64: '', 56: 'd', 48: 'c', 40: 'b', 32: 'a' }
const prefixToLength = { '': 64, 'd': 56, 'c': 48, 'b': 40, 'a': 32 }
const getExtraEntopy = length => bip39.mnemonicToEntropy(
const getExtraEntropy = length => bip39.mnemonicToEntropy(
bip39.generateMnemonic(SECRET_LENGTH * 2)).substring(0, SECRET_LENGTH - length)
@@ -18,7 +18,7 @@ async function split(seed, numShards, threshold) {
}
let ent = bip39.mnemonicToEntropy(seed)
let prefix = lengthToPrefix[ent.length]
ent = ent + getExtraEntopy(ent.length)
ent = ent + getExtraEntropy(ent.length)
let shards = await ssss.createKeyshares(Buffer.from(ent, 'hex'), numShards, threshold)