mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge branch 'master' into feature/consume-flow
This commit is contained in:
commit
c6f1e35c54
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
History
|
||||||
|
=======
|
||||||
|
|
||||||
|
0.1.0 (Mar 31th, 2019)
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
* First version
|
@ -160,11 +160,10 @@ class App extends Component<{}, AppState> {
|
|||||||
isLoading: false,
|
isLoading: false,
|
||||||
ocean
|
ocean
|
||||||
})
|
})
|
||||||
// TODO: squid-js balance retrieval fix
|
|
||||||
const accounts = await ocean.accounts.list()
|
const accounts = await ocean.accounts.list()
|
||||||
const balance = await accounts[0].getBalance()
|
const balance = await accounts[0].getBalance()
|
||||||
this.setState({ balance })
|
const network = await ocean.keeper.getNetworkName()
|
||||||
// TODO: squid-js expose keeper for getNetworkName
|
this.setState({ balance, network })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Logger.log('ocean/balance error', e)
|
Logger.log('ocean/balance error', e)
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -50,8 +50,8 @@ export default class AssetsUser extends PureComponent {
|
|||||||
<div className={styles.assets}>
|
<div className={styles.assets}>
|
||||||
{this.state.results
|
{this.state.results
|
||||||
.filter(asset => !!asset)
|
.filter(asset => !!asset)
|
||||||
.map((asset, index) => (
|
.map((asset: any) => (
|
||||||
<Asset key={index} asset={asset} />
|
<Asset key={asset.id} asset={asset} />
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,6 +4,7 @@ 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 styles from './Search.module.scss'
|
import styles from './Search.module.scss'
|
||||||
|
import { Logger } from '@oceanprotocol/squid'
|
||||||
|
|
||||||
interface SearchState {
|
interface SearchState {
|
||||||
results: any[]
|
results: any[]
|
||||||
@ -26,8 +27,8 @@ export default class Search extends Component<SearchProps, SearchState> {
|
|||||||
public renderResults = () =>
|
public renderResults = () =>
|
||||||
this.state.results.length ? (
|
this.state.results.length ? (
|
||||||
<div className={styles.results}>
|
<div className={styles.results}>
|
||||||
{this.state.results.map(asset => (
|
{this.state.results.map((asset: any) => (
|
||||||
<Asset key={asset} asset={asset} />
|
<Asset key={asset.id} asset={asset} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
Loading…
Reference in New Issue
Block a user