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.
Fails with
TypeError: ipfs.swarm.peers is not a functionI tried fixing it, got as far as replacing
ipfs-peer-bw-example/src/App.js
Lines 7 to 10 in 86919e8
with
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.