diff --git a/src/cli/commands/bitswap/wantlist.js b/src/cli/commands/bitswap/wantlist.js index daebad04e0..bd258ff545 100644 --- a/src/cli/commands/bitswap/wantlist.js +++ b/src/cli/commands/bitswap/wantlist.js @@ -19,7 +19,6 @@ module.exports = Command.extend({ if (err) { throw err } - res.Keys.forEach((k) => console.log(k)) }) }) diff --git a/src/core/ipfs/bitswap.js b/src/core/ipfs/bitswap.js index ada2ecb29e..c8b7e1a806 100644 --- a/src/core/ipfs/bitswap.js +++ b/src/core/ipfs/bitswap.js @@ -1,13 +1,9 @@ 'use strict' -const bs58 = require('bs58') - const OFFLINE_ERROR = require('../utils').OFFLINE_ERROR function formatWantlist (list) { - return Array.from(list).map((el) => { - return bs58.encode(new Buffer(el[0], 'hex')) - }) + return Array.from(list).map((e) => e[0]) } module.exports = function bitswap (self) { diff --git a/test/cli/test-bitswap.js b/test/cli/test-bitswap.js index ee59f63a90..e58e7383f0 100644 --- a/test/cli/test-bitswap.js +++ b/test/cli/test-bitswap.js @@ -52,7 +52,7 @@ describe('bitswap', function () { nexpect.spawn('node', [process.cwd() + '/src/cli/bin.js', 'bitswap', 'wantlist'], {env}) .run((err, stdout, exitcode) => { expect(err).to.not.exist - // expect(exitcode).to.equal(0) + expect(exitcode).to.equal(0) expect(stdout).to.be.eql([ key ])