mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
dummy data test
This commit is contained in:
parent
2276367566
commit
d476259d7f
@ -1,6 +1,36 @@
|
|||||||
import { PoolLogs } from '@oceanprotocol/lib/dist/node/balancer/OceanPool'
|
import {
|
||||||
|
PoolAction,
|
||||||
|
PoolLogs
|
||||||
|
} from '@oceanprotocol/lib/dist/node/balancer/OceanPool'
|
||||||
import { useOcean } from '@oceanprotocol/react'
|
import { useOcean } from '@oceanprotocol/react'
|
||||||
import React, { ReactElement, useEffect, useState } from 'react'
|
import React, { ReactElement, useEffect, useState } from 'react'
|
||||||
|
import DataTable from 'react-data-table-component'
|
||||||
|
|
||||||
|
const data: PoolLogs = {
|
||||||
|
joins: [
|
||||||
|
{
|
||||||
|
poolAddress: '0xxxxx',
|
||||||
|
caller: '',
|
||||||
|
transactionHash: '0xxxxx',
|
||||||
|
blockNumber: 2,
|
||||||
|
tokenIn: 'OCEAN',
|
||||||
|
tokenAmountIn: '10'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
exits: [],
|
||||||
|
swaps: []
|
||||||
|
}
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
name: 'Title',
|
||||||
|
selector: (row: PoolAction) => `Add ${row.tokenAmountIn} ${row.tokenIn}`
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Pool',
|
||||||
|
selector: 'poolAddress'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
export default function PoolTransactions(): ReactElement {
|
export default function PoolTransactions(): ReactElement {
|
||||||
const { ocean, accountId } = useOcean()
|
const { ocean, accountId } = useOcean()
|
||||||
@ -18,6 +48,7 @@ export default function PoolTransactions(): ReactElement {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<DataTable columns={columns} data={data.joins} />
|
||||||
<pre>
|
<pre>
|
||||||
<code>{JSON.stringify(logs, null, 2)}</code>
|
<code>{JSON.stringify(logs, null, 2)}</code>
|
||||||
</pre>
|
</pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user