Skip to content

Commit

Permalink
chore: Commit package-lock for deterministic CI (#208)
Browse files Browse the repository at this point in the history
* Commit lock file for deterministic CI

* Temp non-null assertion operator
  • Loading branch information
dapplion authored Oct 27, 2022
1 parent 1eabe2c commit 2c90b5e
Show file tree
Hide file tree
Showing 3 changed files with 4,413 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock

# Runtime data
pids
Expand Down
4 changes: 2 additions & 2 deletions src/keypair/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export function createKeypairFromPeerId(peerId: PeerId): IKeypair {
const pub = keysPBM.PublicKey.decode(peerId.publicKey);
if (peerId.privateKey) {
const priv = keysPBM.PrivateKey.decode(peerId.privateKey);
return createKeypair(KeypairType[pub.Type] as KeypairType, toBuffer(priv.Data), toBuffer(pub.Data));
return createKeypair(KeypairType[pub.Type!] as KeypairType, toBuffer(priv.Data!), toBuffer(pub.Data!));
} else {
return createKeypair(KeypairType[pub.Type] as KeypairType, undefined, toBuffer(pub.Data));
return createKeypair(KeypairType[pub.Type!] as KeypairType, undefined, toBuffer(pub.Data!));
}
}
Loading

0 comments on commit 2c90b5e

Please sign in to comment.