This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ module.exports = function init (self) {
108
108
cb ( null , true )
109
109
}
110
110
} ,
111
- // Setup offline routing for IPNS. This is primarily used for offline ipns modifications, such as the initializeKeyspace feature.
111
+ // Setup the offline routing for IPNS.
112
+ // This is primarily used for offline ipns modifications, such as the initializeKeyspace feature.
112
113
( _ , cb ) => {
113
114
const offlineDatastore = new OfflineDatastore ( self . _repo )
114
115
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
3
const ipns = require ( 'ipns' )
4
- const { fromB58String } = require ( 'multihashes' )
5
4
const Record = require ( 'libp2p-record' ) . Record
6
5
const PeerId = require ( 'peer-id' )
7
6
const errcode = require ( 'err-code' )
@@ -91,7 +90,7 @@ class IpnsResolver {
91
90
// resolve ipns entries from the provided routing
92
91
_resolveName ( name , callback ) {
93
92
const peerId = PeerId . createFromB58String ( name )
94
- const { routingKey } = ipns . getIdKeys ( fromB58String ( name ) )
93
+ const { routingKey } = ipns . getIdKeys ( peerId . toBytes ( ) )
95
94
96
95
// TODO DHT - get public key from routing?
97
96
// https://github.com/ipfs/go-ipfs/blob/master/namesys/routing.go#L70
You can’t perform that action at this time.
0 commit comments