@xyo-network/react-chain-blockchain 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.mjs +255 -235
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/block/ProducerChip.d.ts +2 -2
- package/dist/types/components/block/ProducerChip.d.ts.map +1 -1
- package/dist/types/components/block/helpers/buildBlockChainRenderComponent.d.ts +2 -3
- package/dist/types/components/block/helpers/buildBlockChainRenderComponent.d.ts.map +1 -1
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts +3 -4
- package/dist/types/components/block/helpers/tsxFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useBlockProducer.d.ts +2 -2
- package/dist/types/components/block/hooks/useBlockProducer.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts +2 -2
- package/dist/types/components/block/hooks/useDynamicBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts +2 -2
- package/dist/types/components/block/hooks/useStaticBlockComponents.d.ts.map +1 -1
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts +3 -4
- package/dist/types/components/block/hooks/useTxsFromBlock.d.ts.map +1 -1
- package/dist/types/components/block/menu/Expanded.d.ts +2 -2
- package/dist/types/components/block/menu/Expanded.d.ts.map +1 -1
- package/dist/types/components/block/table/Ex.d.ts +1 -4
- package/dist/types/components/block/table/Ex.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/TransactionCount.d.ts +0 -2
- package/dist/types/components/block/table/cell/TransactionCount.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts +2 -2
- package/dist/types/components/block/table/cell/lib/BlockTableCellProps.d.ts.map +1 -1
- package/dist/types/components/block/table/head/TableHead.d.ts +3 -0
- package/dist/types/components/block/table/head/TableHead.d.ts.map +1 -0
- package/dist/types/components/block/table/head/index.d.ts +2 -0
- package/dist/types/components/block/table/head/index.d.ts.map +1 -0
- package/dist/types/components/block/table/index.d.ts +1 -0
- package/dist/types/components/block/table/index.d.ts.map +1 -1
- package/dist/types/components/chain/hooks/useOnBlock.d.ts +2 -2
- package/dist/types/components/chain/hooks/useOnBlock.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/flexbox/Flexbox.d.ts +3 -5
- package/dist/types/components/chain/render/dynamic/flexbox/Flexbox.d.ts.map +1 -1
- package/dist/types/components/chain/render/dynamic/flexbox/variants/Base.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/Base.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithAnalysis.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithAnalysis.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithRemote.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/WithRemote.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/index.d.ts +4 -0
- package/dist/types/components/chain/render/dynamic/flexbox/variants/index.d.ts.map +1 -0
- package/dist/types/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.d.ts +1 -1
- package/dist/types/components/chain/render/static/flexbox/Flexbox.d.ts +2 -4
- package/dist/types/components/chain/render/static/flexbox/Flexbox.d.ts.map +1 -1
- package/dist/types/components/chain/render/static/flexbox/variants/Base.d.ts +4 -0
- package/dist/types/components/chain/render/static/flexbox/variants/Base.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/flexbox/variants/WithAnalysis.d.ts +4 -0
- package/dist/types/components/chain/render/static/flexbox/variants/WithAnalysis.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/flexbox/variants/index.d.ts +3 -0
- package/dist/types/components/chain/render/static/flexbox/variants/index.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/table/Ex.d.ts +2 -6
- package/dist/types/components/chain/render/static/table/Ex.d.ts.map +1 -1
- package/dist/types/components/chain/render/static/table/variants/Base.d.ts +4 -0
- package/dist/types/components/chain/render/static/table/variants/Base.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/table/variants/WithAnalysis.d.ts +4 -0
- package/dist/types/components/chain/render/static/table/variants/WithAnalysis.d.ts.map +1 -0
- package/dist/types/components/chain/render/static/table/variants/index.d.ts +3 -0
- package/dist/types/components/chain/render/static/table/variants/index.d.ts.map +1 -0
- package/dist/types/components/payload/fields/XyoAddressTextField.d.ts.map +1 -1
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts +2 -4
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
- package/dist/types/context/analyzer/Provider.d.ts.map +1 -1
- package/dist/types/context/analyzer/state.d.ts +2 -3
- package/dist/types/context/analyzer/state.d.ts.map +1 -1
- package/dist/types/context/chain/Provider.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts +2 -2
- package/dist/types/hooks/chain-iterator/ChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorStore.d.ts.map +1 -1
- package/dist/types/hooks/chain-iterator/useChainIteratorUpdatingHead.d.ts.map +1 -1
- package/dist/types/hooks/useIterateChain.d.ts +2 -2
- package/dist/types/hooks/useIterateChain.d.ts.map +1 -1
- package/dist/types/stories/ChainArchivistDecorator.d.ts.map +1 -1
- package/dist/types/stories/ChainArchivistDelayedInsertDecorator.d.ts.map +1 -1
- package/dist/types/stories/buildRandomBlockchain.d.ts +3 -2
- package/dist/types/stories/buildRandomBlockchain.d.ts.map +1 -1
- package/dist/types/types/BlockComponentProps.d.ts +2 -2
- package/dist/types/types/BlockComponentProps.d.ts.map +1 -1
- package/dist/types/types/BlockComponents.d.ts +2 -2
- package/dist/types/types/BlockComponents.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/components/block/BlockHeadingFlexbox.stories.tsx +2 -2
- package/src/components/block/BlockHeadingFlexbox.tsx +3 -3
- package/src/components/block/ProducerChip.tsx +3 -9
- package/src/components/block/helpers/buildBlockChainRenderComponent.tsx +3 -6
- package/src/components/block/helpers/tsxFromBlock.ts +4 -6
- package/src/components/block/hooks/useBlockProducer.ts +3 -3
- package/src/components/block/hooks/useDynamicBlockComponents.ts +6 -7
- package/src/components/block/hooks/useStaticBlockComponents.ts +4 -4
- package/src/components/block/hooks/useTxsFromBlock.ts +5 -6
- package/src/components/block/menu/Expanded.tsx +4 -4
- package/src/components/block/table/Ex.stories.tsx +4 -8
- package/src/components/block/table/Ex.tsx +5 -14
- package/src/components/block/table/cell/BlockNumber.tsx +3 -3
- package/src/components/block/table/cell/Hash.tsx +1 -1
- package/src/components/block/table/cell/JsonView.tsx +1 -1
- package/src/components/block/table/cell/TransactionCount.tsx +3 -6
- package/src/components/block/table/cell/Verification.tsx +2 -2
- package/src/components/block/table/cell/lib/BlockTableCellProps.ts +2 -2
- package/src/components/block/table/head/TableHead.tsx +19 -0
- package/src/components/block/table/head/index.ts +1 -0
- package/src/components/block/table/index.ts +1 -0
- package/src/components/chain/hooks/useOnBlock.ts +11 -7
- package/src/components/chain/render/dynamic/flexbox/Flexbox.tsx +4 -62
- package/src/components/chain/render/dynamic/flexbox/variants/Base.tsx +27 -0
- package/src/components/chain/render/dynamic/flexbox/variants/WithAnalysis.tsx +25 -0
- package/src/components/chain/render/dynamic/flexbox/variants/WithRemote.tsx +19 -0
- package/src/components/chain/render/dynamic/flexbox/variants/index.ts +3 -0
- package/src/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.ts +1 -1
- package/src/components/chain/render/static/flexbox/Flexbox.tsx +2 -54
- package/src/components/chain/render/static/flexbox/variants/Base.tsx +31 -0
- package/src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx +23 -0
- package/src/components/chain/render/static/flexbox/variants/index.ts +2 -0
- package/src/components/chain/render/static/table/Ex.tsx +2 -36
- package/src/components/chain/render/static/table/variants/Base.tsx +29 -0
- package/src/components/chain/render/static/table/variants/WithAnalysis.tsx +11 -0
- package/src/components/chain/render/static/table/variants/index.ts +2 -0
- package/src/components/payload/fields/XyoAddressTextField.tsx +2 -2
- package/src/components/transactions/TransactionsQuickTipButton.tsx +4 -8
- package/src/context/analyzer/Provider.tsx +3 -8
- package/src/context/analyzer/state.ts +2 -3
- package/src/context/chain/Provider.tsx +4 -6
- package/src/hooks/chain-iterator/ChainIteratorStore.ts +12 -5
- package/src/hooks/chain-iterator/useChainIteratorStore.ts +2 -1
- package/src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts +1 -0
- package/src/hooks/useIterateChain.ts +20 -7
- package/src/stories/ChainArchivistDecorator.tsx +4 -3
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +10 -26
- package/src/stories/buildRandomBlockchain.ts +2 -4
- package/src/types/BlockComponentProps.ts +2 -2
- package/src/types/BlockComponents.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NodesWithKeys } from '@xylabs/react-animation';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/chain-model';
|
|
3
3
|
/** Interface for all block components meant to be rendered in a chain */
|
|
4
4
|
export interface BlockChainRenderComponent extends NodesWithKeys {
|
|
5
|
-
block:
|
|
5
|
+
block: HydratedBlock;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=BlockComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockComponents.d.ts","sourceRoot":"","sources":["../../../src/types/BlockComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BlockComponents.d.ts","sourceRoot":"","sources":["../../../src/types/BlockComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,yEAAyE;AACzE,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC9D,KAAK,EAAE,aAAa,CAAA;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xyo-network/react-chain-blockchain",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.11",
|
|
5
5
|
"description": "XYO Layer One React SDK Blockchain",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
"@xyo-network/archivist-model": "^3.10.4",
|
|
52
52
|
"@xyo-network/boundwitness-builder": "^3.10.4",
|
|
53
53
|
"@xyo-network/bridge-http": "^3.10.4",
|
|
54
|
-
"@xyo-network/chain-ethereum": "^1.0.
|
|
55
|
-
"@xyo-network/chain-model": "^1.0.
|
|
56
|
-
"@xyo-network/chain-protocol": "^1.0.
|
|
57
|
-
"@xyo-network/chain-services": "^1.0.
|
|
54
|
+
"@xyo-network/chain-ethereum": "^1.0.11",
|
|
55
|
+
"@xyo-network/chain-model": "^1.0.11",
|
|
56
|
+
"@xyo-network/chain-protocol": "^1.0.11",
|
|
57
|
+
"@xyo-network/chain-services": "^1.0.11",
|
|
58
58
|
"@xyo-network/module-model": "^3.10.4",
|
|
59
59
|
"@xyo-network/payload-builder": "^3.10.4",
|
|
60
60
|
"@xyo-network/payload-model": "^3.10.4",
|
|
61
|
-
"@xyo-network/react-chain-blockies": "^1.0.
|
|
62
|
-
"@xyo-network/react-chain-boundwitness": "^1.0.
|
|
61
|
+
"@xyo-network/react-chain-blockies": "^1.0.11",
|
|
62
|
+
"@xyo-network/react-chain-boundwitness": "^1.0.11",
|
|
63
63
|
"@xyo-network/react-event": "^5.0.7",
|
|
64
64
|
"@xyo-network/react-payload-raw-info": "^5.0.7",
|
|
65
65
|
"@xyo-network/react-payload-table": "^5.0.7",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@xylabs/ts-scripts-yarn3": "^6.1.4",
|
|
80
80
|
"@xylabs/tsconfig-react": "^6.1.4",
|
|
81
81
|
"@xyo-network/archivist-memory": "^3.10.4",
|
|
82
|
-
"@xyo-network/chain-utils": "^1.0.
|
|
82
|
+
"@xyo-network/chain-utils": "^1.0.11",
|
|
83
83
|
"eslint": "^9.22.0",
|
|
84
84
|
"react": "^19.0.0",
|
|
85
85
|
"react-dom": "^19.0.0",
|
|
@@ -37,8 +37,8 @@ const TemplateWithEvents: StoryFn<typeof BlockHeadingFlexbox> = (args) => {
|
|
|
37
37
|
<div ref={ref}>
|
|
38
38
|
<BlockHeadingFlexbox {...args} />
|
|
39
39
|
<Stack gap={2} flexDirection="column">
|
|
40
|
-
{eventData.length > 0 && eventData.map(
|
|
41
|
-
<Alert key={
|
|
40
|
+
{eventData.length > 0 && eventData.map(event => (
|
|
41
|
+
<Alert key={event.data} sx={{ display: 'flex' }}>
|
|
42
42
|
<AlertTitle>Event Data</AlertTitle>
|
|
43
43
|
<List>
|
|
44
44
|
<ListItem>
|
|
@@ -15,7 +15,7 @@ import { BlockProducerChip } from './ProducerChip.tsx'
|
|
|
15
15
|
export const BlockHeadingFlexbox: React.FC<BlockComponentWithTxsProps> = ({
|
|
16
16
|
block, defaultExpanded, transactions,
|
|
17
17
|
}) => {
|
|
18
|
-
const hash = usePayloadHash(block)
|
|
18
|
+
const hash = usePayloadHash(block?.[0])
|
|
19
19
|
const [blockHeadingRef, blockHeadingListener] = useBlockHeadingEvents<HTMLDivElement>()
|
|
20
20
|
const { pollingState } = useChainPollingContext()
|
|
21
21
|
const expanded = (pollingState === 'paused') || defaultExpanded
|
|
@@ -30,7 +30,7 @@ export const BlockHeadingFlexbox: React.FC<BlockComponentWithTxsProps> = ({
|
|
|
30
30
|
<LinkedDivider />
|
|
31
31
|
<HashHeadingPaper
|
|
32
32
|
hash={hash}
|
|
33
|
-
heading={block?.block === undefined ? '' : block.block.toString()}
|
|
33
|
+
heading={block?.[0].block === undefined ? '' : block?.[0].block.toString()}
|
|
34
34
|
paperProps={{ sx: { p: 1, width: '100%' } }}
|
|
35
35
|
AdornmentEnd={(
|
|
36
36
|
<FlexRow gap={1}>
|
|
@@ -39,7 +39,7 @@ export const BlockHeadingFlexbox: React.FC<BlockComponentWithTxsProps> = ({
|
|
|
39
39
|
onClick={e => handleTransactionCountClick(e, transactions ?? [])}
|
|
40
40
|
transactions={transactions}
|
|
41
41
|
/>
|
|
42
|
-
<BWVerification iconColors boundwitness={block} />
|
|
42
|
+
<BWVerification iconColors boundwitness={block?.[0]} />
|
|
43
43
|
<span style={{
|
|
44
44
|
// maxWidth is required for css animation to work and 28px is the width of the icon button
|
|
45
45
|
display: 'flex', transition: 'max-width .5s', maxWidth: expanded ? '28px' : 0,
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import type { ChipProps } from '@mui/material'
|
|
2
2
|
import { Chip } from '@mui/material'
|
|
3
3
|
import { EthAddress } from '@xylabs/eth-address'
|
|
4
|
-
import type {
|
|
4
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
5
5
|
import { BlockiesAvatar } from '@xyo-network/react-chain-blockies'
|
|
6
6
|
import React, { useMemo } from 'react'
|
|
7
7
|
|
|
8
8
|
export interface BlockProducerChipProps extends ChipProps {
|
|
9
|
-
block?:
|
|
9
|
+
block?: HydratedBlock
|
|
10
10
|
}
|
|
11
11
|
export const BlockProducerChip: React.FC<BlockProducerChipProps> = ({ block, ...props }) => {
|
|
12
|
-
const
|
|
13
|
-
const blockProducer = useMemo(() => {
|
|
14
|
-
if (block) {
|
|
15
|
-
const producer = block.addresses.find(address => address !== sharedAddress)
|
|
16
|
-
return producer
|
|
17
|
-
}
|
|
18
|
-
}, [block])
|
|
12
|
+
const blockProducer = block?.[0].addresses[0]
|
|
19
13
|
|
|
20
14
|
const shortedBlockProducer = blockProducer ? EthAddress.parse(blockProducer)?.toShortString(3) : null
|
|
21
15
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ArchivistInstance } from '@xyo-network/archivist-model'
|
|
2
1
|
import type { ComponentType } from 'react'
|
|
3
2
|
import React from 'react'
|
|
4
3
|
|
|
@@ -12,10 +11,9 @@ import { txsFromBlock } from './tsxFromBlock.ts'
|
|
|
12
11
|
export const buildBlockChainRenderComponent = async (
|
|
13
12
|
BlockComponent: ComponentType<BlockComponentWithTxsProps>,
|
|
14
13
|
blockComponentProps: BlockComponentProps,
|
|
15
|
-
chainArchivist: ArchivistInstance,
|
|
16
14
|
) => {
|
|
17
15
|
const { block, ...remainingProps } = blockComponentProps
|
|
18
|
-
const blockTxs = await txsFromBlock(
|
|
16
|
+
const blockTxs = await txsFromBlock(block)
|
|
19
17
|
const txHashes = blockTxs.map(([_, hash]) => hash)
|
|
20
18
|
|
|
21
19
|
const item: BlockChainRenderComponent = {
|
|
@@ -26,7 +24,7 @@ export const buildBlockChainRenderComponent = async (
|
|
|
26
24
|
{...remainingProps}
|
|
27
25
|
/>
|
|
28
26
|
),
|
|
29
|
-
key: block.block.toString(),
|
|
27
|
+
key: block[0].block.toString(),
|
|
30
28
|
block,
|
|
31
29
|
}
|
|
32
30
|
return item
|
|
@@ -34,7 +32,6 @@ export const buildBlockChainRenderComponent = async (
|
|
|
34
32
|
|
|
35
33
|
export const buildBlockHeadingComponent = async (
|
|
36
34
|
blockComponentProps: BlockComponentProps,
|
|
37
|
-
chainArchivist: ArchivistInstance,
|
|
38
35
|
) => {
|
|
39
|
-
return await buildBlockChainRenderComponent(BlockHeadingFlexbox, blockComponentProps
|
|
36
|
+
return await buildBlockChainRenderComponent(BlockHeadingFlexbox, blockComponentProps)
|
|
40
37
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import { isTransactionBoundWitness } from '@xyo-network/chain-model'
|
|
1
|
+
import { isBoundWitness } from '@xyo-network/boundwitness-model'
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
4
3
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
4
|
|
|
6
|
-
export const txsFromBlock = async (
|
|
7
|
-
const
|
|
8
|
-
const transactionPayloads = payloads.filter(payload => isTransactionBoundWitness(payload))
|
|
5
|
+
export const txsFromBlock = async (block: HydratedBlock) => {
|
|
6
|
+
const transactionPayloads = block[1].filter(payload => isBoundWitness(payload))
|
|
9
7
|
return await PayloadBuilder.hashPairs(transactionPayloads)
|
|
10
8
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
2
2
|
import { useMemo } from 'react'
|
|
3
3
|
|
|
4
|
-
export const useBlockProducer = (block?:
|
|
4
|
+
export const useBlockProducer = (block?: HydratedBlock) => {
|
|
5
5
|
return useMemo(() => {
|
|
6
6
|
if (block) {
|
|
7
|
-
const producer = block.addresses[0]
|
|
7
|
+
const producer = block[0].addresses[0]
|
|
8
8
|
return producer
|
|
9
9
|
}
|
|
10
10
|
}, [block])
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { isBlockBoundWitness } from '@xyo-network/chain-model'
|
|
1
|
+
import type { HydratedBlock, XyoChainIteratorParams } from '@xyo-network/chain-model'
|
|
3
2
|
import type { ComponentType } from 'react'
|
|
4
3
|
import { useState } from 'react'
|
|
5
4
|
|
|
@@ -16,14 +15,14 @@ export const useDynamicBlockComponents = (BlockComponent: ComponentType<BlockCom
|
|
|
16
15
|
|
|
17
16
|
const { onBlock } = useChainAnalyzersContext()
|
|
18
17
|
|
|
19
|
-
const onAddBlock = async (block:
|
|
20
|
-
if (!
|
|
18
|
+
const onAddBlock = async (block: HydratedBlock) => {
|
|
19
|
+
if (!block || !chainArchivist) return
|
|
21
20
|
|
|
22
21
|
const blockComponentProps: BlockComponentProps = { block }
|
|
23
|
-
const newBlockComponent = await buildBlockChainRenderComponent(BlockComponent, blockComponentProps
|
|
22
|
+
const newBlockComponent = await buildBlockChainRenderComponent(BlockComponent, blockComponentProps)
|
|
24
23
|
|
|
25
|
-
if (block.block !== blockChainRenderComponents[0]?.block.block) {
|
|
26
|
-
void onBlock?.(
|
|
24
|
+
if (block?.[0].block !== blockChainRenderComponents[0]?.block?.[0].block) {
|
|
25
|
+
void onBlock?.(block)
|
|
27
26
|
|
|
28
27
|
setBlockChainRenderComponents((blockComponents) => {
|
|
29
28
|
const newBlockComponents = [newBlockComponent, ...blockComponents]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { usePromise } from '@xylabs/react-promise'
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlock, XyoChainIteratorParams } from '@xyo-network/chain-model'
|
|
3
3
|
import type { ComponentType } from 'react'
|
|
4
4
|
|
|
5
5
|
import { useChainAnalyzersContext } from '../../../context/index.ts'
|
|
@@ -9,7 +9,7 @@ import { buildBlockChainRenderComponent } from '../helpers/index.ts'
|
|
|
9
9
|
export const useStaticBlockComponents = (
|
|
10
10
|
BlockComponent: ComponentType<BlockComponentWithTxsProps>,
|
|
11
11
|
params?: XyoChainIteratorParams,
|
|
12
|
-
blocks?:
|
|
12
|
+
blocks?: HydratedBlock[],
|
|
13
13
|
) => {
|
|
14
14
|
const { onBlock } = useChainAnalyzersContext()
|
|
15
15
|
|
|
@@ -21,11 +21,11 @@ export const useStaticBlockComponents = (
|
|
|
21
21
|
|
|
22
22
|
return await Promise.all(resolvedBlockWithStorage?.map(async (block) => {
|
|
23
23
|
if (onBlock && chainArchivist) {
|
|
24
|
-
await onBlock(
|
|
24
|
+
await onBlock(block)
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const blockComponentProps: BlockComponentProps = { block, defaultExpanded: true }
|
|
28
|
-
return await buildBlockChainRenderComponent(BlockComponent, blockComponentProps
|
|
28
|
+
return await buildBlockChainRenderComponent(BlockComponent, blockComponentProps)
|
|
29
29
|
}))
|
|
30
30
|
}, [blocks, params, BlockComponent])
|
|
31
31
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { usePromise } from '@xylabs/react-promise'
|
|
2
|
-
import type {
|
|
3
|
-
import type { BlockBoundWitness } from '@xyo-network/chain-model'
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
4
3
|
|
|
5
4
|
import { txsFromBlock } from '../helpers/index.ts'
|
|
6
5
|
|
|
7
|
-
export const useTxsFromBlock = (
|
|
6
|
+
export const useTxsFromBlock = (block?: HydratedBlock) => {
|
|
8
7
|
return usePromise(async () => {
|
|
9
|
-
if (block
|
|
10
|
-
return await txsFromBlock(
|
|
8
|
+
if (block) {
|
|
9
|
+
return await txsFromBlock(block)
|
|
11
10
|
}
|
|
12
|
-
}, [block
|
|
11
|
+
}, [block])
|
|
13
12
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MoreVert } from '@mui/icons-material'
|
|
2
2
|
import { IconButton, Menu } from '@mui/material'
|
|
3
|
-
import type {
|
|
3
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
4
4
|
import { BWJsonMenuItem, BWPreviousHashMenuItem } from '@xyo-network/react-chain-boundwitness'
|
|
5
5
|
import React from 'react'
|
|
6
6
|
|
|
7
7
|
import { useAnchorElement } from '../hooks/index.ts'
|
|
8
8
|
|
|
9
9
|
export interface BlockExpandedMenuProps {
|
|
10
|
-
block?:
|
|
10
|
+
block?: HydratedBlock
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export const BlockMenuExpanded: React.FC<BlockExpandedMenuProps> = ({ block }) => {
|
|
@@ -26,8 +26,8 @@ export const BlockMenuExpanded: React.FC<BlockExpandedMenuProps> = ({ block }) =
|
|
|
26
26
|
anchorOrigin={{ horizontal: 'left', vertical: 'bottom' }}
|
|
27
27
|
onClose={handleClose}
|
|
28
28
|
>
|
|
29
|
-
<BWPreviousHashMenuItem boundwitness={block} dense onDialogClose={handleClose} />
|
|
30
|
-
<BWJsonMenuItem boundwitness={block} dense onDialogClose={handleClose} />
|
|
29
|
+
<BWPreviousHashMenuItem boundwitness={block?.[0]} dense onDialogClose={handleClose} />
|
|
30
|
+
<BWJsonMenuItem boundwitness={block?.[0]} dense onDialogClose={handleClose} />
|
|
31
31
|
</Menu>
|
|
32
32
|
</>
|
|
33
33
|
)
|
|
@@ -2,8 +2,6 @@ import {
|
|
|
2
2
|
Alert, AlertTitle, Snackbar,
|
|
3
3
|
} from '@mui/material'
|
|
4
4
|
import type { Meta, StoryFn } from '@storybook/react'
|
|
5
|
-
import type { BlockBoundWitness } from '@xyo-network/chain-model'
|
|
6
|
-
import { isBlockBoundWitness } from '@xyo-network/chain-model'
|
|
7
5
|
import type { Event } from '@xyo-network/react-event'
|
|
8
6
|
import { useEvent } from '@xyo-network/react-event'
|
|
9
7
|
import React, { useState } from 'react'
|
|
@@ -48,17 +46,15 @@ Default.args = {}
|
|
|
48
46
|
|
|
49
47
|
const WithData = Template.bind({})
|
|
50
48
|
WithData.args = {
|
|
51
|
-
children: blocks
|
|
52
|
-
|
|
53
|
-
return <BlockChainTableRow key={blockBoundWitness.block} block={blockBoundWitness} />
|
|
49
|
+
children: blocks.map((block) => {
|
|
50
|
+
return <BlockChainTableRow key={block[0].block} block={block} />
|
|
54
51
|
}),
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
const WithLinked = TemplateLinked.bind({})
|
|
58
55
|
WithLinked.args = {
|
|
59
|
-
children: blocks
|
|
60
|
-
|
|
61
|
-
return <BlockChainTableRow key={blockBoundWitness.block} block={blockBoundWitness} linked />
|
|
56
|
+
children: blocks.map((block) => {
|
|
57
|
+
return <BlockChainTableRow key={block[0].block} block={block} linked />
|
|
62
58
|
}),
|
|
63
59
|
}
|
|
64
60
|
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TableBody, TableCell, TableHead, TableRow,
|
|
3
|
-
} from '@mui/material'
|
|
1
|
+
import { TableBody } from '@mui/material'
|
|
4
2
|
import type { TableExProps } from '@xyo-network/react-table'
|
|
5
3
|
import { TableEx } from '@xyo-network/react-table'
|
|
6
4
|
import React from 'react'
|
|
7
5
|
|
|
6
|
+
import { BlockchainTableHead } from './head/index.ts'
|
|
7
|
+
|
|
8
8
|
export const BlockchainTableEx = ({
|
|
9
9
|
ref, children, ...props
|
|
10
|
-
}: TableExProps
|
|
10
|
+
}: TableExProps) => {
|
|
11
11
|
return (
|
|
12
12
|
<TableEx ref={ref} {...props}>
|
|
13
|
-
<
|
|
14
|
-
<TableRow>
|
|
15
|
-
<TableCell>Block Hash</TableCell>
|
|
16
|
-
<TableCell>Block Number</TableCell>
|
|
17
|
-
<TableCell>Transaction Count</TableCell>
|
|
18
|
-
<TableCell align="center">Block Producer</TableCell>
|
|
19
|
-
<TableCell align="center">Valid</TableCell>
|
|
20
|
-
<TableCell align="center">JSON</TableCell>
|
|
21
|
-
</TableRow>
|
|
22
|
-
</TableHead>
|
|
13
|
+
<BlockchainTableHead />
|
|
23
14
|
<TableBody>
|
|
24
15
|
{children}
|
|
25
16
|
</TableBody>
|
|
@@ -11,9 +11,9 @@ export interface BlockNumberTableCellProps extends BlockTableCellProps {}
|
|
|
11
11
|
export const BlockNumberTableCell: React.FC<BlockNumberTableCellProps> = ({
|
|
12
12
|
block, linked, ...props
|
|
13
13
|
}) => {
|
|
14
|
-
const [ref, handleClick] = useLinkedBlockItem('block-number', block?.block.toString())
|
|
14
|
+
const [ref, handleClick] = useLinkedBlockItem('block-number', block?.[0].block.toString())
|
|
15
15
|
|
|
16
|
-
const blockNumberBigInt = block ? block.block.toString() : ''
|
|
16
|
+
const blockNumberBigInt = block ? block[0].block.toString() : ''
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<TableCell ref={ref} {...props}>
|
|
@@ -21,7 +21,7 @@ export const BlockNumberTableCell: React.FC<BlockNumberTableCellProps> = ({
|
|
|
21
21
|
<span>
|
|
22
22
|
{linked && block
|
|
23
23
|
? (
|
|
24
|
-
<Link title={block.block.toString()} onClick={handleClick} sx={{ cursor: 'pointer' }}>{block.block.toString()}</Link>
|
|
24
|
+
<Link title={block[0].block.toString()} onClick={handleClick} sx={{ cursor: 'pointer' }}>{block[0].block.toString()}</Link>
|
|
25
25
|
)
|
|
26
26
|
: null}
|
|
27
27
|
{!linked && blockNumberBigInt}
|
|
@@ -18,7 +18,7 @@ export interface BlockHashTableCellProps extends BlockTableCellProps {
|
|
|
18
18
|
export const BlockHashTableCell: React.FC<BlockHashTableCellProps> = ({
|
|
19
19
|
block, identiconProps, linked, ...props
|
|
20
20
|
}) => {
|
|
21
|
-
const hash = usePayloadHash(block)
|
|
21
|
+
const hash = usePayloadHash(block?.[0])
|
|
22
22
|
|
|
23
23
|
const [ref, handleClick] = useLinkedBlockItem('block-hash', hash)
|
|
24
24
|
|
|
@@ -17,7 +17,7 @@ export const BlockJsonViewTableCell: React.FC<BlockJsonViewTableCellProps> = ({
|
|
|
17
17
|
const [open, setOpen] = useState(false)
|
|
18
18
|
const onClose = () => setOpen(false)
|
|
19
19
|
|
|
20
|
-
const hash = usePayloadHash(block)
|
|
20
|
+
const hash = usePayloadHash(block?.[0])
|
|
21
21
|
const title = hash ? `JSON for ${ellipsize(hash, 5)}` : 'JSON'
|
|
22
22
|
|
|
23
23
|
return (
|
|
@@ -2,21 +2,18 @@ import { Error } from '@mui/icons-material'
|
|
|
2
2
|
import {
|
|
3
3
|
Link, TableCell, Tooltip,
|
|
4
4
|
} from '@mui/material'
|
|
5
|
-
import type { ReadArchivist } from '@xyo-network/archivist-model'
|
|
6
5
|
import React from 'react'
|
|
7
6
|
|
|
8
7
|
import { useTxsFromBlock } from '../../hooks/index.ts'
|
|
9
8
|
import { useLinkedBlockItem } from './hooks/index.ts'
|
|
10
9
|
import type { BlockTableCellProps } from './lib/index.ts'
|
|
11
10
|
|
|
12
|
-
export interface BlockTransactionCountTableCellProps extends BlockTableCellProps {
|
|
13
|
-
chainArchivist?: ReadArchivist
|
|
14
|
-
}
|
|
11
|
+
export interface BlockTransactionCountTableCellProps extends BlockTableCellProps {}
|
|
15
12
|
|
|
16
13
|
export const BlockTransactionCountTableCell: React.FC<BlockTransactionCountTableCellProps> = ({
|
|
17
|
-
block,
|
|
14
|
+
block, linked, ...props
|
|
18
15
|
}) => {
|
|
19
|
-
const [txs, error] = useTxsFromBlock(
|
|
16
|
+
const [txs, error] = useTxsFromBlock(block)
|
|
20
17
|
const [ref, handleClick] = useLinkedBlockItem('transaction-count', JSON.stringify(txs ?? null))
|
|
21
18
|
|
|
22
19
|
return (
|
|
@@ -11,12 +11,12 @@ export interface BlockVerificationTableCellProps extends BlockTableCellProps {}
|
|
|
11
11
|
export const BlockVerificationTableCell: React.FC<BlockVerificationTableCellProps> = ({
|
|
12
12
|
block, linked, ...props
|
|
13
13
|
}) => {
|
|
14
|
-
const [ref, handleClick] = useLinkedBlockItem('block-verification', block?.block.toString())
|
|
14
|
+
const [ref, handleClick] = useLinkedBlockItem('block-verification', block?.[0].block.toString())
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<TableCell ref={ref} {...props}>
|
|
18
18
|
<FlexRow sx={{ width: '100%' }}>
|
|
19
|
-
<BWVerification onClick={linked ? handleClick : undefined} iconColors boundwitness={block} />
|
|
19
|
+
<BWVerification onClick={linked ? handleClick : undefined} iconColors boundwitness={block?.[0]} />
|
|
20
20
|
</FlexRow>
|
|
21
21
|
</TableCell>
|
|
22
22
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TableCellProps } from '@mui/material'
|
|
2
|
-
import type {
|
|
2
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
3
3
|
|
|
4
4
|
export interface BlockTableCellProps extends TableCellProps {
|
|
5
|
-
block?:
|
|
5
|
+
block?: HydratedBlock
|
|
6
6
|
linked?: boolean
|
|
7
7
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TableCell, TableHead, TableRow,
|
|
3
|
+
} from '@mui/material'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
|
|
6
|
+
export const BlockchainTableHead: React.FC = () => {
|
|
7
|
+
return (
|
|
8
|
+
<TableHead>
|
|
9
|
+
<TableRow>
|
|
10
|
+
<TableCell>Block Hash</TableCell>
|
|
11
|
+
<TableCell>Block Number</TableCell>
|
|
12
|
+
<TableCell>Transaction Count</TableCell>
|
|
13
|
+
<TableCell align="center">Block Producer</TableCell>
|
|
14
|
+
<TableCell align="center">Valid</TableCell>
|
|
15
|
+
<TableCell align="center">JSON</TableCell>
|
|
16
|
+
</TableRow>
|
|
17
|
+
</TableHead>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableHead.tsx'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HydratedBlock } from '@xyo-network/chain-model'
|
|
2
2
|
import { useEffect, useRef } from 'react'
|
|
3
3
|
|
|
4
4
|
export type PollingState = 'paused' | 'running'
|
|
5
5
|
|
|
6
6
|
export const useOnBlock = (
|
|
7
7
|
initialHeadNumber?: number,
|
|
8
|
-
onAddBlock?: (block:
|
|
9
|
-
liveHead?:
|
|
8
|
+
onAddBlock?: (block: HydratedBlock) => Promise<void>,
|
|
9
|
+
liveHead?: HydratedBlock,
|
|
10
10
|
pollingState?: PollingState,
|
|
11
11
|
) => {
|
|
12
12
|
/**
|
|
@@ -14,22 +14,26 @@ export const useOnBlock = (
|
|
|
14
14
|
* But, since we get new blockComponents regardless, the hook rerenders anyway so consumers can get
|
|
15
15
|
* the latest blocksWhilePaused value without having to rely on a state update.
|
|
16
16
|
*/
|
|
17
|
-
const blocksWhilePaused = useRef<
|
|
17
|
+
const blocksWhilePaused = useRef<HydratedBlock[]>([])
|
|
18
18
|
// Because the useEffect has liveHead AND pollingState, every time the polling state changes, the hook will
|
|
19
19
|
// run a second time with the live head from the previous run. This is why we need to keep track of the last
|
|
20
20
|
// live head so we can compare it to the current live head and prevent the hook from adding the same block twice
|
|
21
|
-
const lastLiveHead = useRef<
|
|
21
|
+
const lastLiveHead = useRef<HydratedBlock | undefined>(liveHead)
|
|
22
22
|
|
|
23
23
|
useEffect(() => {
|
|
24
|
+
const lastLiveHeadBlock = lastLiveHead.current?.[0]
|
|
25
|
+
const blocksWhilePausedBlock = lastLiveHead.current?.[0]
|
|
26
|
+
const liveHeadBlock = liveHead?.[0]
|
|
27
|
+
|
|
24
28
|
// use lastLiveHead to prevent the hook from adding the same block multiple times
|
|
25
|
-
if (
|
|
29
|
+
if (lastLiveHeadBlock?.block === liveHeadBlock?.block) return
|
|
26
30
|
|
|
27
31
|
if (liveHead && onAddBlock) {
|
|
28
32
|
// update lastLiveHead
|
|
29
33
|
lastLiveHead.current = liveHead
|
|
30
34
|
|
|
31
35
|
// if the polling state is paused and the block is new, add it to the blocksWhilePaused array
|
|
32
|
-
const isNewBlock = initialHeadNumber !==
|
|
36
|
+
const isNewBlock = initialHeadNumber !== liveHeadBlock?.block && liveHeadBlock?.block !== blocksWhilePausedBlock?.block
|
|
33
37
|
if (pollingState === 'paused' && isNewBlock) {
|
|
34
38
|
blocksWhilePaused.current.push(liveHead)
|
|
35
39
|
} else if (pollingState === 'running') {
|
|
@@ -1,65 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import React, { useMemo } from 'react'
|
|
5
|
-
|
|
6
|
-
import type { ChainAnalyzers } from '../../../../../context/index.ts'
|
|
7
|
-
import { ChainAnalyzersProvider, ChainPollingProvider } from '../../../../../context/index.ts'
|
|
8
|
-
import type { BlockChainRenderFlexboxProps, RemoteBlockChainRenderFlexboxProps } from '../../../../../types/index.ts'
|
|
9
|
-
import { BlockHeadingFlexbox } from '../../../../block/index.ts'
|
|
10
|
-
import { MemoizedPollingControlsFlexbox } from '../../../controls/index.ts'
|
|
11
|
-
import { BlockListAnimated } from '../../../list/index.ts'
|
|
12
|
-
import { useDynamicBlockRenderComponents, useRemoteBlockChainRenderProps } from '../hooks/index.ts'
|
|
13
|
-
|
|
14
|
-
const Base: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
15
|
-
const {
|
|
16
|
-
errors, blockChainRenderComponents, blocksWhilePaused, pollingState, updatePollingState,
|
|
17
|
-
} = useDynamicBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps)
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<FlexCol alignItems="start" {...props}>
|
|
21
|
-
{errors?.map((error, index) => <ErrorRender error={error} key={index} scope="DynamicBlockchainRenderFlexboxInner" />)}
|
|
22
|
-
<MemoizedPollingControlsFlexbox
|
|
23
|
-
blocksBehind={blocksWhilePaused?.length}
|
|
24
|
-
pollingState={pollingState}
|
|
25
|
-
setPollingState={updatePollingState}
|
|
26
|
-
/>
|
|
27
|
-
<BlockListAnimated blockChainRenderComponents={blockChainRenderComponents} />
|
|
28
|
-
</FlexCol>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const WithAnalysis: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
33
|
-
const { chainInformation } = blockChainRenderProps ?? {}
|
|
34
|
-
|
|
35
|
-
const analyzers = useMemo(() => {
|
|
36
|
-
if (chainInformation) {
|
|
37
|
-
return { producers: new ChainProducersAnalyzer() } as ChainAnalyzers
|
|
38
|
-
}
|
|
39
|
-
}, [chainInformation])
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<ChainAnalyzersProvider analyzers={analyzers}>
|
|
43
|
-
<ChainPollingProvider>
|
|
44
|
-
<DynamicBlockchainRenderFlexbox.Base blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
45
|
-
</ChainPollingProvider>
|
|
46
|
-
</ChainAnalyzersProvider>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const WithRemote: React.FC<RemoteBlockChainRenderFlexboxProps> = ({
|
|
51
|
-
url, chainArchivistModuleId, blockChainRenderProps: blockChainRenderPropsArg, ...props
|
|
52
|
-
}) => {
|
|
53
|
-
const { error, blockChainRenderProps } = useRemoteBlockChainRenderProps(chainArchivistModuleId, url, blockChainRenderPropsArg)
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<>
|
|
57
|
-
<ErrorRender error={error} scope="RemoteChainProviderFlexbox" />
|
|
58
|
-
<DynamicBlockchainRenderFlexbox.WithAnalysis blockChainRenderProps={blockChainRenderProps} {...props} />
|
|
59
|
-
</>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
DynamicListBase, WithAnalysis, WithRemote,
|
|
3
|
+
} from './variants/index.ts'
|
|
62
4
|
|
|
63
5
|
export const DynamicBlockchainRenderFlexbox = {
|
|
64
|
-
Base, WithAnalysis, WithRemote,
|
|
6
|
+
Base: DynamicListBase, WithAnalysis, WithRemote,
|
|
65
7
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ErrorRender } from '@xylabs/react-error'
|
|
2
|
+
import { FlexCol } from '@xylabs/react-flexbox'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
import type { BlockChainRenderFlexboxProps } from '../../../../../../types/index.ts'
|
|
6
|
+
import { BlockHeadingFlexbox } from '../../../../../block/index.ts'
|
|
7
|
+
import { MemoizedPollingControlsFlexbox } from '../../../../controls/index.ts'
|
|
8
|
+
import { BlockListAnimated } from '../../../../list/index.ts'
|
|
9
|
+
import { useDynamicBlockRenderComponents } from '../../hooks/index.ts'
|
|
10
|
+
|
|
11
|
+
export const DynamicListBase: React.FC<BlockChainRenderFlexboxProps> = ({ blockChainRenderProps, ...props }) => {
|
|
12
|
+
const {
|
|
13
|
+
errors, blockChainRenderComponents, blocksWhilePaused, pollingState, updatePollingState,
|
|
14
|
+
} = useDynamicBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps)
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<FlexCol alignItems="start" {...props}>
|
|
18
|
+
{errors?.map(error => <ErrorRender error={error} key={error?.name} scope="DynamicBlockchainRenderFlexboxInner" />)}
|
|
19
|
+
<MemoizedPollingControlsFlexbox
|
|
20
|
+
blocksBehind={blocksWhilePaused?.length}
|
|
21
|
+
pollingState={pollingState}
|
|
22
|
+
setPollingState={updatePollingState}
|
|
23
|
+
/>
|
|
24
|
+
<BlockListAnimated blockChainRenderComponents={blockChainRenderComponents} />
|
|
25
|
+
</FlexCol>
|
|
26
|
+
)
|
|
27
|
+
}
|