1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

lint fixes

This commit is contained in:
Jernej Pregelj 2019-03-20 10:52:53 +01:00
parent 43d0847d48
commit 601a0bd993

View File

@ -2,10 +2,9 @@ import React, { Component } from 'react'
import Route from '../components/templates/Route'
import { User } from '../context/User'
import Asset from '../components/molecules/Asset'
import { Logger } from '@oceanprotocol/squid';
import { Logger } from '@oceanprotocol/squid'
import styles from './Search.module.scss'
interface InvoicesState {
results: any[]
}
@ -14,24 +13,29 @@ export default class Invoices extends Component<{}, InvoicesState> {
public state = { results: [] }
public async componentDidMount() {
// this is currently my published assets
this.context.ocean.keeper.didRegistry.contract.getPastEvents('DIDAttributeRegistered', {
this.context.ocean.keeper.didRegistry.contract.getPastEvents(
'DIDAttributeRegistered',
{
filter: { _owner: this.context.account },
fromBlock: 0,
toBlock: 'latest'
}, async (error: any, events: any) => {
},
async (error: any, events: any) => {
if (error) {
Logger.log('error retrieving', error)
} else {
const results = []
for (const event of events) {
const ddo = await this.context.ocean.resolveDID(`did:op:${event.returnValues._did.substring(2)}`)
const ddo = await this.context.ocean.resolveDID(
`did:op:${event.returnValues._did.substring(2)}`
)
results.push(ddo)
}
this.setState({ results })
}
})
}
)
}
public renderResults = () =>