From 57ef7eecdf1631f034de0e7b95ad03f4ff98eaad Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Fri, 22 Mar 2019 10:05:25 +0100 Subject: [PATCH 1/3] add changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a2103e1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +History +======= + +0.1.0 (Mar 31th, 2019) +------------------------- + +* First version From 5b27c850d6efa6a0d06146561865fa2d39ba75d8 Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Fri, 22 Mar 2019 15:45:38 +0100 Subject: [PATCH 2/3] listing asset fixes, network name --- client/src/App.tsx | 5 ++--- client/src/components/molecules/AssetsUser.tsx | 4 ++-- client/src/routes/Search.tsx | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 7eb6481..03389bd 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -160,11 +160,10 @@ class App extends Component<{}, AppState> { isLoading: false, ocean }) - // TODO: squid-js balance retrieval fix const accounts = await ocean.getAccounts() const balance = await accounts[0].getBalance() - this.setState({ balance }) - // TODO: squid-js expose keeper for getNetworkName + const network = await ocean.keeper.getNetworkName() + this.setState({ balance, network }) } catch (e) { Logger.log('ocean/balance error', e) this.setState({ diff --git a/client/src/components/molecules/AssetsUser.tsx b/client/src/components/molecules/AssetsUser.tsx index 0ce6039..6fe82ed 100644 --- a/client/src/components/molecules/AssetsUser.tsx +++ b/client/src/components/molecules/AssetsUser.tsx @@ -48,8 +48,8 @@ export default class AssetsUser extends PureComponent { ) : this.state.results.length ? (
- {this.state.results.map((asset, index) => ( - + {this.state.results.map((asset: any) => ( + ))}
) : ( diff --git a/client/src/routes/Search.tsx b/client/src/routes/Search.tsx index fb5c4f1..581f421 100644 --- a/client/src/routes/Search.tsx +++ b/client/src/routes/Search.tsx @@ -4,6 +4,7 @@ import Route from '../components/templates/Route' import { User } from '../context/User' import Asset from '../components/molecules/Asset' import styles from './Search.module.scss' +import { Logger } from '@oceanprotocol/squid'; interface SearchState { results: any[] @@ -26,8 +27,8 @@ export default class Search extends Component { public renderResults = () => this.state.results.length ? (
- {this.state.results.map(asset => ( - + {this.state.results.map((asset: any) => ( + ))}
) : ( From 50b5382cfba3168b2665ddab3063ea2e4222ee3e Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Fri, 22 Mar 2019 15:46:52 +0100 Subject: [PATCH 3/3] linting --- client/src/routes/Search.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/routes/Search.tsx b/client/src/routes/Search.tsx index 581f421..fb24853 100644 --- a/client/src/routes/Search.tsx +++ b/client/src/routes/Search.tsx @@ -4,7 +4,7 @@ import Route from '../components/templates/Route' import { User } from '../context/User' import Asset from '../components/molecules/Asset' import styles from './Search.module.scss' -import { Logger } from '@oceanprotocol/squid'; +import { Logger } from '@oceanprotocol/squid' interface SearchState { results: any[]