chore: lead maintainer update (#98)

This commit is contained in:
Vasco Santos 2019-07-30 21:17:24 +02:00 committed by GitHub
parent 94aa3483b3
commit 911aa634d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 8 deletions

View File

@ -22,7 +22,6 @@ jobs:
- stage: check
script:
- npx aegir commitlint --travis
- npx aegir dep-check
- npm run lint

View File

@ -13,7 +13,7 @@
## Lead Maintainer
[Pedro Teixeira](https://github.com/pgte)
[Vasco Santos](https://github.com/vasco-santos)
## Table of Contents

View File

@ -2,7 +2,7 @@
"name": "peer-id",
"version": "0.13.2",
"description": "IPFS Peer Id implementation in Node.js",
"leadMaintainer": "Pedro Teixeira <i@pgte.me>",
"leadMaintainer": "Vasco Santos <santos.vasco10@gmail.com>",
"main": "src/index.js",
"bin": "src/bin.js",
"scripts": {
@ -34,7 +34,7 @@
},
"homepage": "https://github.com/libp2p/js-peer-id",
"devDependencies": {
"aegir": "^19.0.5",
"aegir": "^20.0.0",
"bundlesize": "~0.18.0",
"chai": "^4.2.0",
"dirty-chai": "^2.0.1"

View File

@ -213,10 +213,10 @@ exports.createFromPrivKey = async (key) => {
}
exports.createFromJSON = async (obj) => {
let id = mh.fromB58String(obj.id)
let rawPrivKey = obj.privKey && Buffer.from(obj.privKey, 'base64')
let rawPubKey = obj.pubKey && Buffer.from(obj.pubKey, 'base64')
let pub = rawPubKey && await cryptoKeys.unmarshalPublicKey(rawPubKey)
const id = mh.fromB58String(obj.id)
const rawPrivKey = obj.privKey && Buffer.from(obj.privKey, 'base64')
const rawPubKey = obj.pubKey && Buffer.from(obj.pubKey, 'base64')
const pub = rawPubKey && await cryptoKeys.unmarshalPublicKey(rawPubKey)
if (!rawPrivKey) {
return new PeerIdWithIs(id, null, pub)