diff --git a/src/peer-store/persistent/index.js b/src/peer-store/persistent/index.js index 0cf54c0d9e..8a3cb777ce 100644 --- a/src/peer-store/persistent/index.js +++ b/src/peer-store/persistent/index.js @@ -210,7 +210,7 @@ class PersistentPeerStore extends PeerStore { try { // Deleted from the book - if (!peerId.pubKey) { + if (!this.keyBook.data.get(peerId.toB58String())) { batch.delete(key) return } diff --git a/test/fixtures/browser.js b/test/fixtures/browser.js index 3b2c02654a..f5f33259dc 100644 --- a/test/fixtures/browser.js +++ b/test/fixtures/browser.js @@ -3,5 +3,5 @@ const multiaddr = require('multiaddr') module.exports.MULTIADDRS_WEBSOCKETS = [ -multiaddr('/ip4/127.0.0.1/tcp/15001/ws/p2p/12D3KooWHFKTMzwerBtsVmtz4ZZEQy2heafxzWw6wNn5PPYkBxJ5') + multiaddr('/ip4/127.0.0.1/tcp/15001/ws/p2p/12D3KooWHFKTMzwerBtsVmtz4ZZEQy2heafxzWw6wNn5PPYkBxJ5') ]