@xyo-network/react-chain-blockchain 1.3.6 → 1.3.8
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 +272 -213
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/block/table/cell/BlockNumber.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/BlockNumberChip.d.ts +7 -0
- package/dist/types/components/block/table/cell/BlockNumberChip.d.ts.map +1 -0
- package/dist/types/components/block/table/cell/PayloadCounts.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/Producer.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/TransactionCount.d.ts.map +1 -1
- package/dist/types/components/block/table/row/TableRow.d.ts.map +1 -1
- package/package.json +32 -30
- package/src/components/block/table/cell/BlockNumber.tsx +9 -7
- package/src/components/block/table/cell/BlockNumberChip.tsx +11 -0
- package/src/components/block/table/cell/PayloadCounts.tsx +27 -4
- package/src/components/block/table/cell/Producer.tsx +1 -4
- package/src/components/block/table/cell/TransactionCount.tsx +16 -2
- package/src/components/block/table/head/TableHead.tsx +4 -4
- package/src/components/block/table/row/TableRow.tsx +15 -7
- package/src/components/transactions/TransactionCountChip.tsx +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/BlockNumber.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"BlockNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/BlockNumber.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;CAAG;AAEzE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAsBpE,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChipProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface BlockNumberChipProps extends ChipProps {
|
|
4
|
+
blockNumber?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const BlockNumberChip: React.FC<BlockNumberChipProps>;
|
|
7
|
+
//# sourceMappingURL=BlockNumberChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockNumberChip.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/BlockNumberChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAE1D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadCounts.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/PayloadCounts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PayloadCounts.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/PayloadCounts.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,MAAM,WAAW,gCAAiC,SAAQ,mBAAmB;CAAG;AAEhF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,IAAI,CAAA;IACX,eAAe,EAAE,MAAM,CAAA;IACvB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,gCAAgC,CAgDlF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Producer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/Producer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Producer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/Producer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAGpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;CAC3C;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAiBnE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionCount.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/TransactionCount.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"TransactionCount.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/cell/TransactionCount.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAkB,MAAM,OAAO,CAAA;AAKtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,MAAM,WAAW,mCAAoC,SAAQ,mBAAmB;CAAG;AAEnF,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,IAAI,CAAA;IACX,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,8BAA8B,EAAE,KAAK,CAAC,EAAE,CAAC,mCAAmC,CAyCxF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/row/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/block/table/row/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAGlD,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAOrE,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB,EAAE,aAAa;IACjF,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAuBhE,CAAA"}
|
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.3.
|
|
4
|
+
"version": "1.3.8",
|
|
5
5
|
"description": "XYO Layer One React SDK Blockchain",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -43,33 +43,34 @@
|
|
|
43
43
|
"@xylabs/exists": "^4.8.7",
|
|
44
44
|
"@xylabs/hex": "^4.8.7",
|
|
45
45
|
"@xylabs/promise": "^4.8.7",
|
|
46
|
-
"@xylabs/react-animation": "^6.2.
|
|
47
|
-
"@xylabs/react-error": "^6.2.
|
|
48
|
-
"@xylabs/react-flexbox": "^6.2.
|
|
49
|
-
"@xylabs/react-identicon": "^6.2.
|
|
50
|
-
"@xylabs/react-promise": "^6.2.
|
|
51
|
-
"@xylabs/react-quick-tip-button": "^6.2.
|
|
52
|
-
"@
|
|
53
|
-
"@xyo-network/
|
|
54
|
-
"@xyo-network/
|
|
55
|
-
"@xyo-network/
|
|
56
|
-
"@xyo-network/boundwitness-
|
|
57
|
-
"@xyo-network/
|
|
58
|
-
"@xyo-network/
|
|
59
|
-
"@xyo-network/chain-
|
|
60
|
-
"@xyo-network/chain-
|
|
61
|
-
"@xyo-network/
|
|
62
|
-
"@xyo-network/
|
|
63
|
-
"@xyo-network/payload-
|
|
64
|
-
"@xyo-network/
|
|
65
|
-
"@xyo-network/react-
|
|
66
|
-
"@xyo-network/react-
|
|
67
|
-
"@xyo-network/react-
|
|
68
|
-
"@xyo-network/react-payload-
|
|
69
|
-
"@xyo-network/react-
|
|
70
|
-
"@xyo-network/react-
|
|
71
|
-
"@xyo-network/
|
|
72
|
-
"@xyo-network/xl1-
|
|
46
|
+
"@xylabs/react-animation": "^6.2.11",
|
|
47
|
+
"@xylabs/react-error": "^6.2.11",
|
|
48
|
+
"@xylabs/react-flexbox": "^6.2.11",
|
|
49
|
+
"@xylabs/react-identicon": "^6.2.11",
|
|
50
|
+
"@xylabs/react-promise": "^6.2.11",
|
|
51
|
+
"@xylabs/react-quick-tip-button": "^6.2.11",
|
|
52
|
+
"@xylabs/react-theme": "^6.2.11",
|
|
53
|
+
"@xyo-network/account": "^3.14.13",
|
|
54
|
+
"@xyo-network/api-models": "^3.14.13",
|
|
55
|
+
"@xyo-network/archivist-model": "^3.14.13",
|
|
56
|
+
"@xyo-network/boundwitness-builder": "^3.14.13",
|
|
57
|
+
"@xyo-network/boundwitness-model": "^3.14.13",
|
|
58
|
+
"@xyo-network/bridge-http": "^3.14.13",
|
|
59
|
+
"@xyo-network/chain-ethereum": "^1.3.8",
|
|
60
|
+
"@xyo-network/chain-protocol": "^1.3.8",
|
|
61
|
+
"@xyo-network/chain-services": "^1.3.8",
|
|
62
|
+
"@xyo-network/module-model": "^3.14.13",
|
|
63
|
+
"@xyo-network/payload-builder": "^3.14.13",
|
|
64
|
+
"@xyo-network/payload-model": "^3.14.13",
|
|
65
|
+
"@xyo-network/react-boundwitness-plugin": "^5.2.5",
|
|
66
|
+
"@xyo-network/react-chain-blockies": "^1.3.8",
|
|
67
|
+
"@xyo-network/react-event": "^5.2.5",
|
|
68
|
+
"@xyo-network/react-payload-raw-info": "^5.2.5",
|
|
69
|
+
"@xyo-network/react-payload-table": "^5.2.5",
|
|
70
|
+
"@xyo-network/react-shared": "^5.2.5",
|
|
71
|
+
"@xyo-network/react-table": "^5.2.5",
|
|
72
|
+
"@xyo-network/xl1-model": "^1.3.8",
|
|
73
|
+
"@xyo-network/xl1-protocol": "^1.3.8"
|
|
73
74
|
},
|
|
74
75
|
"devDependencies": {
|
|
75
76
|
"@emotion/react": "^11.14.0",
|
|
@@ -82,8 +83,9 @@
|
|
|
82
83
|
"@xylabs/hex": "^4.8.7",
|
|
83
84
|
"@xylabs/ts-scripts-yarn3": "^6.3.5",
|
|
84
85
|
"@xylabs/tsconfig-react": "^6.3.5",
|
|
85
|
-
"@xyo-network/archivist-memory": "^3.13
|
|
86
|
-
"@xyo-network/chain-utils": "^1.3.
|
|
86
|
+
"@xyo-network/archivist-memory": "^3.14.13",
|
|
87
|
+
"@xyo-network/chain-utils": "^1.3.8",
|
|
88
|
+
"knip": "^5.50.5",
|
|
87
89
|
"react": "^19.1.0",
|
|
88
90
|
"react-dom": "^19.1.0",
|
|
89
91
|
"react-router-dom": "^7.5.2",
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
} from '@mui/material'
|
|
4
4
|
import React from 'react'
|
|
5
5
|
|
|
6
|
+
import { BlockNumberChip } from './BlockNumberChip.tsx'
|
|
6
7
|
import { useLinkedBlockItem } from './hooks/index.ts'
|
|
7
8
|
import type { BlockTableCellProps } from './lib/index.ts'
|
|
8
9
|
|
|
@@ -11,20 +12,21 @@ export interface BlockNumberTableCellProps extends BlockTableCellProps {}
|
|
|
11
12
|
export const BlockNumberTableCell: React.FC<BlockNumberTableCellProps> = ({
|
|
12
13
|
block, linked, ...props
|
|
13
14
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const blockNumberBigInt = block ? block[0].block.toString() : ''
|
|
15
|
+
const blockNumber = block?.[0].block
|
|
16
|
+
const [ref, handleClick] = useLinkedBlockItem('block-number', blockNumber?.toString())
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<TableCell ref={ref} {...props}>
|
|
20
|
-
<Tooltip title={`Block Number: ${
|
|
20
|
+
<Tooltip title={`Block Number: ${blockNumber}`}>
|
|
21
21
|
<span>
|
|
22
|
-
{linked &&
|
|
22
|
+
{linked && blockNumber !== undefined
|
|
23
23
|
? (
|
|
24
|
-
<Link title={
|
|
24
|
+
<Link title={blockNumber?.toString()} onClick={handleClick} sx={{ cursor: 'pointer' }}>
|
|
25
|
+
<BlockNumberChip blockNumber={blockNumber} size="small" />
|
|
26
|
+
</Link>
|
|
25
27
|
)
|
|
26
28
|
: null}
|
|
27
|
-
{!linked &&
|
|
29
|
+
{!linked && <BlockNumberChip blockNumber={blockNumber} size="small" />}
|
|
28
30
|
</span>
|
|
29
31
|
</Tooltip>
|
|
30
32
|
</TableCell>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChipProps } from '@mui/material'
|
|
2
|
+
import { Chip } from '@mui/material'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
export interface BlockNumberChipProps extends ChipProps {
|
|
6
|
+
blockNumber?: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const BlockNumberChip: React.FC<BlockNumberChipProps> = ({ blockNumber, ...props }) => {
|
|
10
|
+
return <Chip avatar={<></>} label={blockNumber} {...props} />
|
|
11
|
+
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { Error } from '@mui/icons-material'
|
|
2
1
|
import {
|
|
2
|
+
Error, Public, PublicOff,
|
|
3
|
+
} from '@mui/icons-material'
|
|
4
|
+
import {
|
|
5
|
+
Chip,
|
|
3
6
|
Link, TableCell, Tooltip,
|
|
4
7
|
} from '@mui/material'
|
|
5
8
|
import type { Hash } from '@xylabs/hex'
|
|
9
|
+
import { FlexRow } from '@xylabs/react-flexbox'
|
|
6
10
|
import React from 'react'
|
|
7
11
|
|
|
8
12
|
import { usePayloadCountsFromBlock } from '../../hooks/index.ts'
|
|
@@ -30,8 +34,6 @@ export const BlockPayloadCountsTableCell: React.FC<BlockPayloadCountsTableCellPr
|
|
|
30
34
|
: undefined
|
|
31
35
|
const [ref, handleClick] = useLinkedBlockItem('payload-counts', data)
|
|
32
36
|
|
|
33
|
-
const renderText = `${publicPayloads ?? '--'} / ${privatePayloads ?? '--'}`
|
|
34
|
-
|
|
35
37
|
return (
|
|
36
38
|
<TableCell ref={ref} {...props}>
|
|
37
39
|
<span>
|
|
@@ -42,7 +44,28 @@ export const BlockPayloadCountsTableCell: React.FC<BlockPayloadCountsTableCellPr
|
|
|
42
44
|
</Tooltip>
|
|
43
45
|
)
|
|
44
46
|
: null}
|
|
45
|
-
{linked
|
|
47
|
+
{linked
|
|
48
|
+
? (
|
|
49
|
+
<Tooltip title={`Public Payloads: ${publicPayloads ?? '--'} Private Payloads: ${privatePayloads ?? '--'}`}>
|
|
50
|
+
<Link
|
|
51
|
+
onClick={handleClick}
|
|
52
|
+
sx={{
|
|
53
|
+
cursor: 'pointer', display: 'inline-flex', gap: 0.5,
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<Chip avatar={<Public fontSize="small" />} label={publicPayloads ?? '--'} />
|
|
57
|
+
<Chip avatar={<PublicOff fontSize="small" />} label={privatePayloads ?? '--'} />
|
|
58
|
+
</Link>
|
|
59
|
+
</Tooltip>
|
|
60
|
+
)
|
|
61
|
+
: (
|
|
62
|
+
<Tooltip title={`Public Payloads: ${publicPayloads ?? '--'} Private Payloads: ${privatePayloads ?? '--'}`}>
|
|
63
|
+
<FlexRow gap={0.5} justifyContent="left">
|
|
64
|
+
<Chip avatar={<Public fontSize="small" />} label={publicPayloads ?? '--'} />
|
|
65
|
+
<Chip avatar={<PublicOff fontSize="small" />} label={privatePayloads ?? '--'} />
|
|
66
|
+
</FlexRow>
|
|
67
|
+
</Tooltip>
|
|
68
|
+
)}
|
|
46
69
|
</span>
|
|
47
70
|
</TableCell>
|
|
48
71
|
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TableCell, Tooltip } from '@mui/material'
|
|
2
|
-
import { FlexRow } from '@xylabs/react-flexbox'
|
|
3
2
|
import React from 'react'
|
|
4
3
|
|
|
5
4
|
import { FeatureNotAvailable } from '../../../FeatureNotAvailable.tsx'
|
|
@@ -24,9 +23,7 @@ export const BlockProducerTableCell: React.FC<BlockProducerTableCell> = ({
|
|
|
24
23
|
return (
|
|
25
24
|
<TableCell ref={ref} {...props}>
|
|
26
25
|
<Tooltip title={`Block Producer: ${producer}`}>
|
|
27
|
-
<
|
|
28
|
-
<BlockProducerChip sx={{ cursor: 'pointer' }} onClick={linked ? handleClick : () => setNotAvailable(true)} block={block} {...producerChipProps} />
|
|
29
|
-
</FlexRow>
|
|
26
|
+
<BlockProducerChip sx={{ cursor: 'pointer' }} onClick={linked ? handleClick : () => setNotAvailable(true)} block={block} {...producerChipProps} />
|
|
30
27
|
</Tooltip>
|
|
31
28
|
{(notAvailableDialog && notAvailable)
|
|
32
29
|
? <FeatureNotAvailable featureName="Producer Details" open={notAvailable} onClick={() => setNotAvailable(false)} />
|
|
@@ -3,9 +3,10 @@ import {
|
|
|
3
3
|
Link, TableCell, Tooltip,
|
|
4
4
|
} from '@mui/material'
|
|
5
5
|
import type { Hash } from '@xylabs/hex'
|
|
6
|
-
import React from 'react'
|
|
6
|
+
import React, { useMemo } from 'react'
|
|
7
7
|
|
|
8
8
|
import { useTxsFromBlock } from '../../../../hooks/useTxsFromBlock.ts'
|
|
9
|
+
import { TransactionCountChip } from '../../../transactions/index.ts'
|
|
9
10
|
import { useLinkedBlockItem } from './hooks/index.ts'
|
|
10
11
|
import type { BlockTableCellProps } from './lib/index.ts'
|
|
11
12
|
|
|
@@ -20,6 +21,7 @@ export const BlockTransactionCountTableCell: React.FC<BlockTransactionCountTable
|
|
|
20
21
|
block, linked, ...props
|
|
21
22
|
}) => {
|
|
22
23
|
const [transactions, error] = useTxsFromBlock(block)
|
|
24
|
+
const txHashes = useMemo(() => transactions?.map(([,hash]) => hash), [transactions])
|
|
23
25
|
|
|
24
26
|
const data: BlockTransactionCountEventData | undefined = (block && transactions !== undefined)
|
|
25
27
|
? {
|
|
@@ -40,7 +42,19 @@ export const BlockTransactionCountTableCell: React.FC<BlockTransactionCountTable
|
|
|
40
42
|
</Tooltip>
|
|
41
43
|
)
|
|
42
44
|
: null}
|
|
43
|
-
{linked
|
|
45
|
+
{linked
|
|
46
|
+
? (
|
|
47
|
+
<Link onClick={handleClick} sx={{ cursor: 'pointer' }}>
|
|
48
|
+
<TransactionCountChip
|
|
49
|
+
transactions={txHashes}
|
|
50
|
+
/>
|
|
51
|
+
</Link>
|
|
52
|
+
)
|
|
53
|
+
: (
|
|
54
|
+
<TransactionCountChip
|
|
55
|
+
transactions={txHashes}
|
|
56
|
+
/>
|
|
57
|
+
)}
|
|
44
58
|
</span>
|
|
45
59
|
</TableCell>
|
|
46
60
|
)
|
|
@@ -28,11 +28,11 @@ export const BlockchainTableHead: React.FC = () => {
|
|
|
28
28
|
return (
|
|
29
29
|
<TableHead>
|
|
30
30
|
<TableRow>
|
|
31
|
+
<ToolTipTableCell align="left" title="The block number that is included in the block">Block</ToolTipTableCell>
|
|
31
32
|
<ToolTipTableCell title="The hash of the block">Block Hash</ToolTipTableCell>
|
|
32
|
-
<ToolTipTableCell align="
|
|
33
|
-
<ToolTipTableCell align="
|
|
34
|
-
<ToolTipTableCell align="
|
|
35
|
-
<ToolTipTableCell align="center" title="The address of the block producer that produced the block">Block Producer</ToolTipTableCell>
|
|
33
|
+
<ToolTipTableCell align="left" title="The address of the block producer that produced the block">Block Producer</ToolTipTableCell>
|
|
34
|
+
<ToolTipTableCell align="left" title="Count of transactions that are included in the block">Transactions</ToolTipTableCell>
|
|
35
|
+
<ToolTipTableCell align="left" title="Count of public and private payload counts for the block">Payloads</ToolTipTableCell>
|
|
36
36
|
<ToolTipTableCell align="center" title="The result of the local validation check for the block">Valid</ToolTipTableCell>
|
|
37
37
|
<ToolTipTableCell align="center" title="Link to display the raw JSON of the block">JSON</ToolTipTableCell>
|
|
38
38
|
</TableRow>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TableRowProps } from '@mui/material'
|
|
2
|
-
import { TableRow } from '@mui/material'
|
|
2
|
+
import { TableRow, useTheme } from '@mui/material'
|
|
3
|
+
import { alphaCss } from '@xylabs/react-theme'
|
|
3
4
|
import React, { useMemo } from 'react'
|
|
4
5
|
|
|
5
6
|
import type { BlockComponentProps } from '../../../../types/index.ts'
|
|
@@ -18,13 +19,20 @@ export const BlockChainTableRow: React.FC<BlockChainTableRowProps> = ({
|
|
|
18
19
|
}) => {
|
|
19
20
|
const linkedTableCellProps = useMemo(() => ({ block, linked }), [block, linked])
|
|
20
21
|
const defaultTableCellProps = useMemo(() => ({ block }), [block])
|
|
22
|
+
const theme = useTheme()
|
|
23
|
+
|
|
21
24
|
return (
|
|
22
|
-
<TableRow
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
<TableRow
|
|
26
|
+
sx={{
|
|
27
|
+
'overflowY': 'scroll', '&:hover': { backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.85) }, ...sx,
|
|
28
|
+
}}
|
|
29
|
+
{...props}
|
|
30
|
+
>
|
|
31
|
+
<BlockNumberTableCell align="left" {...linkedTableCellProps} />
|
|
32
|
+
<BlockHashTableCell align="left" {...linkedTableCellProps} />
|
|
33
|
+
<BlockProducerTableCell align="left" {...linkedTableCellProps} />
|
|
34
|
+
<BlockTransactionCountTableCell align="left" {...linkedTableCellProps} />
|
|
35
|
+
<BlockPayloadCountsTableCell align="left" {...linkedTableCellProps} />
|
|
28
36
|
<BlockVerificationTableCell {...defaultTableCellProps} />
|
|
29
37
|
<BlockJsonViewTableCell {...defaultTableCellProps} />
|
|
30
38
|
</TableRow>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CompareArrowsIcon from '@mui/icons-material/CompareArrows'
|
|
2
2
|
import type { ChipProps } from '@mui/material'
|
|
3
3
|
import { Chip, Icon } from '@mui/material'
|
|
4
4
|
import type { Hash } from '@xylabs/hex'
|
|
@@ -20,10 +20,10 @@ export const TransactionCountChip: React.FC<TransactionCountChipProps> = ({
|
|
|
20
20
|
<Chip
|
|
21
21
|
avatar={(
|
|
22
22
|
<Icon>
|
|
23
|
-
<
|
|
23
|
+
<CompareArrowsIcon />
|
|
24
24
|
</Icon>
|
|
25
25
|
)}
|
|
26
|
-
label={
|
|
26
|
+
label={label}
|
|
27
27
|
title={transactions ? `Block contains ${transactions.length} transactions` : undefined}
|
|
28
28
|
sx={{
|
|
29
29
|
display: 'inline-flex', alignItems: 'center', justifyContent: 'center', ...sx,
|