mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
lint fixes
This commit is contained in:
parent
43d0847d48
commit
601a0bd993
@ -2,10 +2,9 @@ import React, { Component } from 'react'
|
|||||||
import Route from '../components/templates/Route'
|
import Route from '../components/templates/Route'
|
||||||
import { User } from '../context/User'
|
import { User } from '../context/User'
|
||||||
import Asset from '../components/molecules/Asset'
|
import Asset from '../components/molecules/Asset'
|
||||||
import { Logger } from '@oceanprotocol/squid';
|
import { Logger } from '@oceanprotocol/squid'
|
||||||
import styles from './Search.module.scss'
|
import styles from './Search.module.scss'
|
||||||
|
|
||||||
|
|
||||||
interface InvoicesState {
|
interface InvoicesState {
|
||||||
results: any[]
|
results: any[]
|
||||||
}
|
}
|
||||||
@ -14,24 +13,29 @@ export default class Invoices extends Component<{}, InvoicesState> {
|
|||||||
public state = { results: [] }
|
public state = { results: [] }
|
||||||
|
|
||||||
public async componentDidMount() {
|
public async componentDidMount() {
|
||||||
|
|
||||||
// this is currently my published assets
|
// this is currently my published assets
|
||||||
this.context.ocean.keeper.didRegistry.contract.getPastEvents('DIDAttributeRegistered', {
|
this.context.ocean.keeper.didRegistry.contract.getPastEvents(
|
||||||
filter: {_owner:this.context.account},
|
'DIDAttributeRegistered',
|
||||||
fromBlock: 0,
|
{
|
||||||
toBlock: 'latest'
|
filter: { _owner: this.context.account },
|
||||||
}, async (error: any, events: any) => {
|
fromBlock: 0,
|
||||||
if (error) {
|
toBlock: 'latest'
|
||||||
Logger.log('error retrieving', error)
|
},
|
||||||
} else {
|
async (error: any, events: any) => {
|
||||||
const results = []
|
if (error) {
|
||||||
for (const event of events) {
|
Logger.log('error retrieving', error)
|
||||||
const ddo = await this.context.ocean.resolveDID(`did:op:${event.returnValues._did.substring(2)}`)
|
} else {
|
||||||
results.push(ddo)
|
const results = []
|
||||||
|
for (const event of events) {
|
||||||
|
const ddo = await this.context.ocean.resolveDID(
|
||||||
|
`did:op:${event.returnValues._did.substring(2)}`
|
||||||
|
)
|
||||||
|
results.push(ddo)
|
||||||
|
}
|
||||||
|
this.setState({ results })
|
||||||
}
|
}
|
||||||
this.setState({ results })
|
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
public renderResults = () =>
|
public renderResults = () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user