Skip to content

Commit

Permalink
Merge pull request ipfs#1120 from ipfs/pass-correct-config
Browse files Browse the repository at this point in the history
fix: get correct remote node config
  • Loading branch information
achingbrain authored Oct 4, 2019
2 parents 10060a6 + 5b53e22 commit aca704b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions src/add-from-fs/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
'use strict'

const configure = require('../lib/configure')
const globSource = require('ipfs-utils/src/files/glob-source')

module.exports = configure(({ ky }) => {
const add = require('../add')({ ky })
module.exports = (config) => {
const add = require('../add')(config)
return (path, options) => add(globSource(path, options), options)
})
}
7 changes: 3 additions & 4 deletions src/add-from-url.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict'

const kyDefault = require('ky-universal').default
const configure = require('./lib/configure')
const toIterable = require('./lib/stream-to-iterable')

module.exports = configure(({ ky }) => {
const add = require('./add')({ ky })
module.exports = (config) => {
const add = require('./add')(config)

return (url, options) => (async function * () {
options = options || {}
Expand All @@ -19,4 +18,4 @@ module.exports = configure(({ ky }) => {

yield * add(input, options)
})()
})
}
5 changes: 3 additions & 2 deletions src/pubsub/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ const configure = require('../lib/configure')
const toIterable = require('../lib/stream-to-iterable')
const SubscriptionTracker = require('./subscription-tracker')

module.exports = configure(({ ky }) => {
module.exports = configure((config) => {
const ky = config.ky
const subsTracker = SubscriptionTracker.singleton()
const publish = require('./publish')({ ky })
const publish = require('./publish')(config)

return async (topic, handler, options) => {
options = options || {}
Expand Down

0 comments on commit aca704b

Please sign in to comment.