Skip to content

Doesn't work anymore #2

Open
Open
@j2ghz

Description

@j2ghz

Fails with TypeError: ipfs.swarm.peers is not a function
I tried fixing it, got as far as replacing

export default class App extends Component {
componentWillMount () {
getIpfs().then(ipfs => this.setState({ ipfs }))
}

with

export default class App extends Component {
  componentWillMount () {
    getIpfs().then(ipfs => 
      ipfs.enable({
        commands: ['swarm','stats']
      }).then(ipfs=>{
        this.setState({
          ipfs
        })
      })
      )
  }

but that still doesn't work.
The bandwidth stats window.ipfs returns should all be BigNumber (from BigNumber.js)
But the actual objects have 3 properties: e,c,s which looks more like Big (from Big.js)
I'm not sure what could be wrong there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions