Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
block.get - use cid.toBaseEncodedString (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis authored and daviddias committed May 14, 2017
1 parent c7ef39a commit 6b83215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ module.exports = (send) => {
try {
if (CID.isCID(args)) {
cid = args
args = multihash.toB58String(args.multihash)
args = cid.toBaseEncodedString()
} else if (Buffer.isBuffer(args)) {
cid = new CID(args)
args = multihash.toB58String(args)
args = cid.toBaseEncodedString()
} else if (typeof args === 'string') {
cid = new CID(args)
} else {
Expand Down

0 comments on commit 6b83215

Please sign in to comment.