mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge pull request #34 from oceanprotocol/fix/frontend-fixes
Fix/frontend fixes
This commit is contained in:
commit
366f48b9ad
@ -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({
|
||||
|
@ -48,8 +48,8 @@ export default class AssetsUser extends PureComponent {
|
||||
<Spinner />
|
||||
) : this.state.results.length ? (
|
||||
<div className={styles.assets}>
|
||||
{this.state.results.map((asset, index) => (
|
||||
<Asset key={index} asset={asset} />
|
||||
{this.state.results.map((asset: any) => (
|
||||
<Asset key={asset.id} asset={asset} />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
|
@ -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<SearchProps, SearchState> {
|
||||
public renderResults = () =>
|
||||
this.state.results.length ? (
|
||||
<div className={styles.results}>
|
||||
{this.state.results.map(asset => (
|
||||
<Asset key={asset} asset={asset} />
|
||||
{this.state.results.map((asset: any) => (
|
||||
<Asset key={asset.id} asset={asset} />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
|
Loading…
Reference in New Issue
Block a user