diff --git a/package.json b/package.json index 6f02f35fe..4f0846e10 100644 --- a/package.json +++ b/package.json @@ -72,8 +72,8 @@ "eslint-plugin-react": "^7.7.0", "go-ipfs-dep": "^0.4.13", "gulp": "^3.9.1", - "hapi": "^17.2.2", - "interface-ipfs-core": "~0.56.0", + "hapi": "^17.2.3", + "interface-ipfs-core": "~0.56.5", "ipfs": "~0.28.2", "ipfsd-ctl": "~0.30.1", "pre-commit": "^1.2.2", diff --git a/src/files/stat.js b/src/files/stat.js index 804865ba0..4077d1945 100644 --- a/src/files/stat.js +++ b/src/files/stat.js @@ -2,24 +2,17 @@ const promisify = require('promisify-es6') const _ = require('lodash') -const streamToValue = require('../utils/stream-to-value') -const transform = function (res, callback) { - return streamToValue(res, (err, data) => { - if (err) { - return callback(err) - } - - callback(null, { - type: data[0].Type, - blocks: data[0].Blocks, - size: data[0].Size, - hash: data[0].Hash, - cumulativeSize: data[0].CumulativeSize, - withLocality: data[0].WithLocality || false, - local: data[0].Local || null, - sizeLocal: data[0].SizeLocal || null - }) +const transform = function (data, callback) { + callback(null, { + type: data.Type, + blocks: data.Blocks, + size: data.Size, + hash: data.Hash, + cumulativeSize: data.CumulativeSize, + withLocality: data.WithLocality || false, + local: data.Local || undefined, + sizeLocal: data.SizeLocal || undefined }) }