Skip to content

Commit

Permalink
add optional networkId props
Browse files Browse the repository at this point in the history
  • Loading branch information
olekon committed Jan 7, 2020
1 parent 72836a2 commit 0762af3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/contract/ContractEventsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const defaultFromBlock = 0;
* Props:
* event - event entry of the ABI array,
* onFetch - Fetch button handler (inputs)
* networkId - network id (optional)
*/
class Item extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -84,7 +85,7 @@ class Item extends React.Component {
<Spin spinning={this.state.loading}>
{
this.state.events
? <EventsGrid events={this.state.events} event={this.props.event} />
? <EventsGrid networkId={this.props.networkId} events={this.state.events} event={this.props.event} />
: null
}
</Spin>
Expand Down Expand Up @@ -129,7 +130,7 @@ class ContractEventsView extends React.Component {
<Collapse>
{events.map((event, index) => (
<Collapse.Panel header={event.name} key={event.name + index}>
<Item event={event} onFetch={this.fetchEvents} />
<Item event={event} networkId={this.props.contract.chainId} onFetch={this.fetchEvents} />
</Collapse.Panel>
))}
</Collapse>
Expand Down

0 comments on commit 0762af3

Please sign in to comment.