From 213a9956b6d6261361d2646c242d9dff1f249bd6 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 28 Mar 2019 13:15:26 +0100 Subject: [PATCH] merge fix --- .../src/components/organisms/AssetsUser.tsx | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/client/src/components/organisms/AssetsUser.tsx b/client/src/components/organisms/AssetsUser.tsx index 2663e07..b28f698 100644 --- a/client/src/components/organisms/AssetsUser.tsx +++ b/client/src/components/organisms/AssetsUser.tsx @@ -18,24 +18,24 @@ export default class AssetsUser extends PureComponent< private async searchOcean() { if (this.context.account) { - this.context.ocean.keeper.didRegistry.contract.getPastEvents( - 'DIDAttributeRegistered', - { - filter: { _owner: this.context.account }, - fromBlock: 0, - toBlock: 'latest' - }, - async (error: any, events: any) => { - if (error) { - Logger.log('error retrieving', error) - this.setState({ isLoading: false }) - } else { - const results = [] - for (const event of events) { - const ddo = await this.context.ocean.assets.resolve( - `did:op:${event.returnValues._did.substring(2)}` - ) - results.push(ddo) + this.context.ocean.keeper.didRegistry.contract.getPastEvents( + 'DIDAttributeRegistered', + { + filter: { _owner: this.context.account }, + fromBlock: 0, + toBlock: 'latest' + }, + async (error: any, events: any) => { + if (error) { + Logger.log('error retrieving', error) + this.setState({ isLoading: false }) + } else { + const results = [] + for (const event of events) { + const ddo = await this.context.ocean.assets.resolve( + `did:op:${event.returnValues._did.substring(2)}` + ) + results.push(ddo) } this.setState({ results, isLoading: false }) } @@ -56,11 +56,11 @@ export default class AssetsUser extends PureComponent< )} - {this.state.isLoading ? ( - - ) : this.state.results.length ? ( - <> - {this.state.results + {this.state.isLoading ? ( + + ) : this.state.results.length ? ( + <> + {this.state.results .slice( 0, this.props.recent