mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
test getAllPoolLogs
This commit is contained in:
parent
2b19aaa773
commit
b6574dcbb3
20
src/components/pages/History/PoolTransactions.tsx
Normal file
20
src/components/pages/History/PoolTransactions.tsx
Normal 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>
|
||||||
|
}
|
@ -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 { Logger } from '@oceanprotocol/lib'
|
||||||
import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore'
|
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'
|
import AssetList from '../../organisms/AssetList'
|
||||||
|
|
||||||
export default function PublishedList(): ReactElement {
|
export default function PublishedList(): ReactElement {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
composes: box from '../../atoms/Box.module.css';
|
|
||||||
margin-bottom: var(--spacer);
|
margin-bottom: var(--spacer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React, { ReactElement, ReactNode } from 'react'
|
import React, { ReactElement, ReactNode } from 'react'
|
||||||
import styles from './index.module.css'
|
import styles from './index.module.css'
|
||||||
|
import PoolTransactions from './PoolTransactions'
|
||||||
import PublishedList from './PublishedList'
|
import PublishedList from './PublishedList'
|
||||||
|
|
||||||
const sections = [
|
const sections = [
|
||||||
@ -7,6 +8,10 @@ const sections = [
|
|||||||
title: 'Published',
|
title: 'Published',
|
||||||
component: <PublishedList />
|
component: <PublishedList />
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Pool Transactions',
|
||||||
|
component: <PoolTransactions />
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Compute Jobs',
|
title: 'Compute Jobs',
|
||||||
component: 'Coming Soon...'
|
component: 'Coming Soon...'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user