1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

test getAllPoolLogs

This commit is contained in:
Matthias Kretschmann 2020-09-29 16:47:45 +02:00
parent 2b19aaa773
commit b6574dcbb3
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 28 additions and 4 deletions

View File

@ -0,0 +1,20 @@
import { PoolLogs } from '@oceanprotocol/lib/dist/node/balancer/OceanPool'
import { useOcean } from '@oceanprotocol/react'
import React, { ReactElement, useEffect, useState } from 'react'
export default function PoolTransactions(): ReactElement {
const { ocean, accountId } = useOcean()
const [logs, setLogs] = useState<PoolLogs>()
useEffect(() => {
async function getLogs() {
const logs = await ocean.pool.getAllPoolLogs(accountId)
setLogs(logs)
}
getLogs()
}, [ocean, accountId])
logs && console.log(logs)
return <div>Hello</div>
}

View File

@ -1,8 +1,8 @@
import React, { useEffect, useState, ReactElement } from 'react'
import Loader from '../../atoms/Loader'
import { useOcean } from '@oceanprotocol/react'
import { Logger } from '@oceanprotocol/lib'
import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore'
import { useOcean } from '@oceanprotocol/react'
import React, { ReactElement, useEffect, useState } from 'react'
import Loader from '../../atoms/Loader'
import AssetList from '../../organisms/AssetList'
export default function PublishedList(): ReactElement {

View File

@ -21,7 +21,6 @@
}
.section {
composes: box from '../../atoms/Box.module.css';
margin-bottom: var(--spacer);
}

View File

@ -1,5 +1,6 @@
import React, { ReactElement, ReactNode } from 'react'
import styles from './index.module.css'
import PoolTransactions from './PoolTransactions'
import PublishedList from './PublishedList'
const sections = [
@ -7,6 +8,10 @@ const sections = [
title: 'Published',
component: <PublishedList />
},
{
title: 'Pool Transactions',
component: <PoolTransactions />
},
{
title: 'Compute Jobs',
component: 'Coming Soon...'