@@ -60,7 +60,7 @@ class InitState extends React.Component {
async componentDidMount() {
const tipset = await this.props.client.call("Filecoin.ChainHead", []) // TODO: from props
- const actors = await this.props.client.call("Filecoin.StateListActors", [tipset])
+ const actors = await this.props.client.call("Filecoin.StateListActors", [tipset.Cids])
this.setState({actors: actors})
}
@@ -79,8 +79,8 @@ class PowerState extends React.Component {
async componentDidMount() {
const tipset = await this.props.client.call("Filecoin.ChainHead", []) // TODO: from props
- const actors = await this.props.client.call("Filecoin.StateListMiners", [tipset])
- const state = await this.props.client.call('Filecoin.StateReadState', [this.props.actor, tipset])
+ const actors = await this.props.client.call("Filecoin.StateListMiners", [tipset.Cids])
+ const state = await this.props.client.call('Filecoin.StateReadState', [this.props.actor, tipset.Cids])
this.setState({actors, state})
}
@@ -105,9 +105,9 @@ class MarketState extends React.Component {
async componentDidMount() {
const tipset = await this.props.client.call("Filecoin.ChainHead", []) // TODO: from props
- const participants = await this.props.client.call("Filecoin.StateMarketParticipants", [tipset])
- const deals = await this.props.client.call("Filecoin.StateMarketDeals", [tipset])
- const state = await this.props.client.call('Filecoin.StateReadState', [this.props.actor, tipset])
+ const participants = await this.props.client.call("Filecoin.StateMarketParticipants", [tipset.Cids])
+ const deals = await this.props.client.call("Filecoin.StateMarketDeals", [tipset.Cids])
+ const state = await this.props.client.call('Filecoin.StateReadState', [this.props.actor, tipset.Cids])
this.setState({participants, deals, nextDeal: state.State.NextDealID})
}
@@ -128,15 +128,15 @@ class MarketState extends React.Component {
---
Deals ({this.state.nextDeal} Total):
- id | Active | Client | Provider | Size | Price | Duration |
+ id | Started | Client | Provider | Size | Price | Duration |
{Object.keys(this.state.deals).map(d =>
{d} |
- {this.state.deals[d].ActivationEpoch || "No"} |
- |
- |
- {this.state.deals[d].Deal.Proposal.PieceSize}B |
- {this.state.deals[d].Deal.Proposal.StoragePricePerEpoch*this.state.deals[d].Deal.Proposal.Duration} |
- {this.state.deals[d].Deal.Proposal.Duration} |
+ {this.state.deals[d].State.SectorStartEpoch || "No"} |
+ |
+ |
+ {this.state.deals[d].Proposal.PieceSize}B |
+ {this.state.deals[d].Proposal.StoragePricePerEpoch*(this.state.deals[d].Proposal.EndEpoch-this.state.deals[d].Proposal.StartEpoch)} |
+ {this.state.deals[d].Proposal.EndEpoch-this.state.deals[d].Proposal.StartEpoch} |
)}
@@ -153,17 +153,17 @@ class MinerState extends React.Component {
async componentDidMount() {
const tipset = await this.props.client.call("Filecoin.ChainHead", []) // TODO: from props
- const state = await this.props.client.call('Filecoin.StateReadState', [this.props.actor, tipset])
- const sectorSize = await this.props.client.call("Filecoin.StateMinerSectorSize", [this.props.addr, tipset])
- const worker = await this.props.client.call("Filecoin.StateMinerWorker", [this.props.addr, tipset])
+ const state = await this.props.client.call('Filecoin.StateReadState', [this.props.actor, tipset.Cids])
+ const sectorSize = await this.props.client.call("Filecoin.StateMinerSectorSize", [this.props.addr, tipset.Cids])
+ const worker = await this.props.client.call("Filecoin.StateMinerWorker", [this.props.addr, tipset.Cids])
- const tpow = await this.props.client.call("Filecoin.StateMinerPower", [this.props.addr, tipset])
+ const tpow = await this.props.client.call("Filecoin.StateMinerPower", [this.props.addr, tipset.Cids])
const networkPower = tpow.TotalPower
let sectors = {}
- const sset = await this.props.client.call("Filecoin.StateMinerSectors", [this.props.addr, tipset]) || []
- const pset = await this.props.client.call("Filecoin.StateMinerProvingSet", [this.props.addr, tipset]) || []
+ const sset = await this.props.client.call("Filecoin.StateMinerSectors", [this.props.addr, tipset.Cids]) || []
+ const pset = await this.props.client.call("Filecoin.StateMinerProvingSet", [this.props.addr, tipset.Cids]) || []
sset.forEach(s => sectors[s.SectorID] = {...s, sectorSet: true})
pset.forEach(s => sectors[s.SectorID] = {...(sectors[s.SectorID] || s), provingSet: true})
@@ -181,7 +181,7 @@ class MinerState extends React.Component {
return
Sector Size: {this.state.sectorSize/1024} KiB
-
Power: {state.Power} ({state.Power/this.state.networkPower*100}%)
+
Power: todoPower ({1/this.state.networkPower*100}%)
Election Period Start: {state.ElectionPeriodStart}
Slashed: {state.SlashedAt === 0 ? "NO" : state.SlashedAt}