@xyo-network/react-chain-blockchain 1.20.15 → 1.20.17
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/README.md +9 -8854
- package/dist/browser/components/block/table/cell/NumberChip.d.ts.map +1 -1
- package/dist/browser/components/chain/controls/PulseSvgIcon.d.ts +5 -2
- package/dist/browser/components/chain/controls/PulseSvgIcon.d.ts.map +1 -1
- package/dist/browser/components/chain/hooks/useOnBlock.d.ts +7 -7
- package/dist/browser/components/chain/styled/BlockListWrapperFlexbox.d.ts +6 -1
- package/dist/browser/components/chain/styled/BlockListWrapperFlexbox.d.ts.map +1 -1
- package/dist/browser/components/table/StyledLinkableTableRow.d.ts +5 -4
- package/dist/browser/components/table/StyledLinkableTableRow.d.ts.map +1 -1
- package/dist/browser/context/analyzer/context.d.ts +3 -3
- package/dist/browser/context/analyzer/use.d.ts +1 -1
- package/dist/browser/context/chain/Context.d.ts +3 -3
- package/dist/browser/context/chain/use.d.ts +1 -1
- package/dist/browser/hooks/useBaseContext.d.ts +2 -8
- package/dist/browser/hooks/useBaseContext.d.ts.map +1 -1
- package/dist/browser/hooks/useTxsFromBlock.d.ts +1 -1
- package/dist/browser/hooks/useTxsFromBlock.d.ts.map +1 -1
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +169 -60
- package/src/components/FeatureNotAvailable.tsx +0 -20
- package/src/components/account/BalanceHistoryFlexbox.stories.tsx +0 -25
- package/src/components/account/BalanceHistoryFlexbox.tsx +0 -53
- package/src/components/account/helpers/formatBalanceMagnitude.ts +0 -14
- package/src/components/account/helpers/index.ts +0 -1
- package/src/components/account/hooks/index.ts +0 -1
- package/src/components/account/hooks/usePagedAccountBalanceHistory.ts +0 -39
- package/src/components/account/index.ts +0 -4
- package/src/components/account/table/BalanceHistoryTableEx.stories.tsx +0 -111
- package/src/components/account/table/BalanceHistoryTableEx.tsx +0 -37
- package/src/components/account/table/BalanceHistoryTableRow.stories.tsx +0 -53
- package/src/components/account/table/BalanceHistoryTableRow.tsx +0 -60
- package/src/components/account/table/RawAmountTableCell.tsx +0 -53
- package/src/components/account/table/cell/AddressTableCell.tsx +0 -27
- package/src/components/account/table/cell/BlockNumber.tsx +0 -39
- package/src/components/account/table/cell/HashTableCell.tsx +0 -46
- package/src/components/account/table/cell/index.ts +0 -3
- package/src/components/account/table/hooks/index.ts +0 -1
- package/src/components/account/table/hooks/useLinkedBalanceHistoryItem.tsx +0 -29
- package/src/components/account/table/index.ts +0 -5
- package/src/components/account/table/types/index.ts +0 -18
- package/src/components/block/BlockHeadingFlexbox.stories.tsx +0 -75
- package/src/components/block/BlockHeadingFlexbox.tsx +0 -56
- package/src/components/block/ChipSkeleton.tsx +0 -7
- package/src/components/block/LinkedDivider.tsx +0 -27
- package/src/components/block/ProducerChip.tsx +0 -45
- package/src/components/block/helpers/blockProducer.ts +0 -5
- package/src/components/block/helpers/buildBlockChainRenderComponent.tsx +0 -32
- package/src/components/block/helpers/index.ts +0 -3
- package/src/components/block/helpers/payloadCountsFromBlock.ts +0 -10
- package/src/components/block/hooks/index.ts +0 -4
- package/src/components/block/hooks/useAnchorElement.ts +0 -19
- package/src/components/block/hooks/useBlockHeadingEvents.ts +0 -11
- package/src/components/block/hooks/useBlockProducer.ts +0 -11
- package/src/components/block/hooks/usePayloadCountsFromBlock.ts +0 -13
- package/src/components/block/index.ts +0 -6
- package/src/components/block/menu/Expanded.tsx +0 -34
- package/src/components/block/menu/index.ts +0 -1
- package/src/components/block/table/Ex.stories.tsx +0 -64
- package/src/components/block/table/Ex.tsx +0 -21
- package/src/components/block/table/cell/BlockNumber.tsx +0 -35
- package/src/components/block/table/cell/Epoch.tsx +0 -46
- package/src/components/block/table/cell/Hash.tsx +0 -46
- package/src/components/block/table/cell/JsonView.tsx +0 -44
- package/src/components/block/table/cell/NumberChip.tsx +0 -12
- package/src/components/block/table/cell/PayloadCounts.tsx +0 -65
- package/src/components/block/table/cell/Producer.tsx +0 -63
- package/src/components/block/table/cell/TransactionCount.tsx +0 -56
- package/src/components/block/table/cell/Verification.tsx +0 -25
- package/src/components/block/table/cell/helpers/index.ts +0 -1
- package/src/components/block/table/cell/helpers/timeFunctions.ts +0 -44
- package/src/components/block/table/cell/hooks/index.ts +0 -1
- package/src/components/block/table/cell/hooks/useLinkedBlockItem.tsx +0 -25
- package/src/components/block/table/cell/index.ts +0 -8
- package/src/components/block/table/cell/lib/BlockTableCellProps.ts +0 -7
- package/src/components/block/table/cell/lib/index.ts +0 -1
- package/src/components/block/table/head/TableHead.tsx +0 -48
- package/src/components/block/table/head/index.ts +0 -1
- package/src/components/block/table/index.ts +0 -4
- package/src/components/block/table/row/TableRow.stories.tsx +0 -34
- package/src/components/block/table/row/TableRow.tsx +0 -46
- package/src/components/block/table/row/index.ts +0 -1
- package/src/components/chain/controls/PollingControlsFlexbox.tsx +0 -76
- package/src/components/chain/controls/PulseSvgIcon.tsx +0 -71
- package/src/components/chain/controls/index.ts +0 -2
- package/src/components/chain/dialog/Dialog.tsx +0 -20
- package/src/components/chain/dialog/index.ts +0 -1
- package/src/components/chain/hooks/index.ts +0 -1
- package/src/components/chain/hooks/useOnBlock.ts +0 -55
- package/src/components/chain/index.ts +0 -6
- package/src/components/chain/list/Animated.tsx +0 -19
- package/src/components/chain/list/TableEx.tsx +0 -12
- package/src/components/chain/list/index.ts +0 -2
- package/src/components/chain/pagination/BlockChainPagination.tsx +0 -11
- package/src/components/chain/pagination/hooks/index.ts +0 -1
- package/src/components/chain/pagination/hooks/usePagination.tsx +0 -22
- package/src/components/chain/pagination/index.ts +0 -2
- package/src/components/chain/stats/Dialog.tsx +0 -49
- package/src/components/chain/stats/index.ts +0 -1
- package/src/components/chain/stats/producer/ProducerFlexbox.tsx +0 -32
- package/src/components/chain/stats/producer/Table.tsx +0 -39
- package/src/components/chain/stats/producer/index.ts +0 -2
- package/src/components/chain/styled/BlockListWrapperFlexbox.tsx +0 -15
- package/src/components/chain/styled/index.ts +0 -1
- package/src/components/index.ts +0 -7
- package/src/components/payload/builder/BuilderComponentProps.ts +0 -5
- package/src/components/payload/builder/Flexbox.tsx +0 -30
- package/src/components/payload/builder/index.ts +0 -4
- package/src/components/payload/builder/producer-intent/Flexbox.stories.tsx +0 -14
- package/src/components/payload/builder/producer-intent/Flexbox.tsx +0 -15
- package/src/components/payload/builder/producer-intent/Form.tsx +0 -69
- package/src/components/payload/builder/producer-intent/index.ts +0 -1
- package/src/components/payload/builder/transfer/Flexbox.stories.tsx +0 -14
- package/src/components/payload/builder/transfer/Flexbox.tsx +0 -15
- package/src/components/payload/builder/transfer/Form.tsx +0 -82
- package/src/components/payload/builder/transfer/Transfer.ts +0 -3
- package/src/components/payload/builder/transfer/builder/SingleFlexbox.tsx +0 -51
- package/src/components/payload/builder/transfer/builder/index.ts +0 -1
- package/src/components/payload/builder/transfer/index.ts +0 -2
- package/src/components/payload/fields/BlockNumberTextField.tsx +0 -40
- package/src/components/payload/fields/XyoAddressTextField.tsx +0 -71
- package/src/components/payload/fields/index.ts +0 -2
- package/src/components/payload/index.ts +0 -2
- package/src/components/rate/SpanTypography.tsx +0 -20
- package/src/components/rate/SpeedTypography.tsx +0 -17
- package/src/components/rate/TimeTypography.tsx +0 -17
- package/src/components/rate/flexbox/FlexBox.stories.tsx +0 -46
- package/src/components/rate/flexbox/FlexBox.tsx +0 -31
- package/src/components/rate/flexbox/index.ts +0 -1
- package/src/components/rate/gauge/Container.stories.tsx +0 -80
- package/src/components/rate/gauge/Container.tsx +0 -75
- package/src/components/rate/gauge/Pointer.tsx +0 -67
- package/src/components/rate/gauge/Ticks.tsx +0 -122
- package/src/components/rate/gauge/WithLabel.stories.tsx +0 -73
- package/src/components/rate/gauge/WithLabel.tsx +0 -20
- package/src/components/rate/gauge/helpers/blockRateConversions.ts +0 -104
- package/src/components/rate/gauge/helpers/index.ts +0 -1
- package/src/components/rate/gauge/index.ts +0 -4
- package/src/components/rate/index.ts +0 -6
- package/src/components/rate/support/MetricTypography.tsx +0 -78
- package/src/components/rate/support/index.ts +0 -1
- package/src/components/table/StyledLinkableTableRow.tsx +0 -12
- package/src/components/table/index.ts +0 -1
- package/src/components/transactions/TransactionCountChip.tsx +0 -34
- package/src/components/transactions/TransactionsQuickTipButton.tsx +0 -86
- package/src/components/transactions/index.ts +0 -3
- package/src/components/transactions/submit/Builder.tsx +0 -55
- package/src/components/transactions/submit/Network.tsx +0 -36
- package/src/components/transactions/submit/SubmitChain.stories.tsx +0 -14
- package/src/components/transactions/submit/SubmitChain.tsx +0 -91
- package/src/components/transactions/submit/index.ts +0 -3
- package/src/context/analyzer/Provider.tsx +0 -41
- package/src/context/analyzer/context.ts +0 -5
- package/src/context/analyzer/index.ts +0 -5
- package/src/context/analyzer/state.ts +0 -13
- package/src/context/analyzer/use.ts +0 -6
- package/src/context/chain/Context.ts +0 -5
- package/src/context/chain/Provider.tsx +0 -49
- package/src/context/chain/State.ts +0 -8
- package/src/context/chain/index.ts +0 -4
- package/src/context/chain/use.ts +0 -6
- package/src/context/index.ts +0 -3
- package/src/context/polling/Provider.tsx +0 -27
- package/src/context/polling/context.ts +0 -5
- package/src/context/polling/index.ts +0 -4
- package/src/context/polling/state.ts +0 -8
- package/src/context/polling/use.ts +0 -5
- package/src/helpers/index.ts +0 -1
- package/src/helpers/rate/index.ts +0 -1
- package/src/helpers/rate/rateUnitToLabel.ts +0 -27
- package/src/helpers/txsFromBlock.ts +0 -12
- package/src/hooks/chain-iterator/index.ts +0 -1
- package/src/hooks/chain-iterator/useChainIteratorParams.ts +0 -55
- package/src/hooks/index.ts +0 -3
- package/src/hooks/useBaseContext.ts +0 -8
- package/src/hooks/useTxsFromBlock.ts +0 -12
- package/src/index.ts +0 -3
- package/src/lib/getChainArchivist.ts +0 -20
- package/src/lib/getChainId.ts +0 -8
- package/src/lib/index.ts +0 -2
- package/src/stories/ChainArchivistDecorator.tsx +0 -43
- package/src/stories/ChainArchivistDelayedInsertDecorator.tsx +0 -71
- package/src/stories/index.ts +0 -2
- package/src/types/BlockComponentProps.ts +0 -13
- package/src/types/BlockComponents.ts +0 -7
- package/src/types/BlockListComponentProps.ts +0 -6
- package/src/types/global.d.ts +0 -1
- package/src/types/index.ts +0 -4
- package/src/types/render/BlockChainRenderProps.ts +0 -28
- package/src/types/render/RemoteArchivistProps.ts +0 -5
- package/src/types/render/flexbox/BlockChainRenderFlexboxProps.ts +0 -8
- package/src/types/render/flexbox/RenderFlexboxProps.ts +0 -5
- package/src/types/render/flexbox/index.ts +0 -2
- package/src/types/render/index.ts +0 -4
- package/src/types/render/table/BlockChainRenderTableExProps.ts +0 -8
- package/src/types/render/table/RenderTableProps.ts +0 -5
- package/src/types/render/table/index.ts +0 -2
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.20.
|
|
4
|
+
"version": "1.20.17",
|
|
5
5
|
"description": "XYO Layer One React SDK Blockchain",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -25,100 +25,209 @@
|
|
|
25
25
|
"types": "./dist/browser/index.d.ts",
|
|
26
26
|
"browser": {
|
|
27
27
|
"types": "./dist/browser/index.d.ts",
|
|
28
|
-
"source": "./src/index.ts",
|
|
29
28
|
"default": "./dist/browser/index.mjs"
|
|
30
29
|
},
|
|
31
|
-
"source": "./src/index.ts",
|
|
32
30
|
"default": "./dist/browser/index.mjs"
|
|
33
31
|
},
|
|
34
32
|
"./package.json": "./package.json"
|
|
35
33
|
},
|
|
36
34
|
"module": "./dist/browser/index.mjs",
|
|
37
|
-
"source": "./src/index.ts",
|
|
38
35
|
"types": "./dist/browser/index.d.ts",
|
|
39
36
|
"files": [
|
|
40
37
|
"dist",
|
|
41
|
-
"src",
|
|
42
38
|
"!**/*.bench.*",
|
|
43
39
|
"!**/*.spec.*",
|
|
44
|
-
"!**/*.test.*"
|
|
40
|
+
"!**/*.test.*",
|
|
41
|
+
"README.md"
|
|
45
42
|
],
|
|
46
|
-
"scripts": {
|
|
47
|
-
"package-cycle": "echo Nothing to do"
|
|
48
|
-
},
|
|
49
43
|
"dependencies": {
|
|
50
|
-
"@
|
|
51
|
-
"@xylabs/react-
|
|
52
|
-
"@xylabs/react-
|
|
53
|
-
"@xylabs/react-
|
|
54
|
-
"@xylabs/react-quick-tip-button": "~7.1.
|
|
55
|
-
"@xylabs/react-shared": "~7.1.
|
|
56
|
-
"@xylabs/react-theme": "~7.1.
|
|
57
|
-
"@xylabs/sdk-js": "~5.0.
|
|
58
|
-
"@xyo-network/boundwitness-model": "~5.3.
|
|
59
|
-
"@xyo-network/chain-analyze": "~1.20.15",
|
|
60
|
-
"@xyo-network/chain-protocol": "~1.20.15",
|
|
61
|
-
"@xyo-network/chain-wrappers": "~1.20.15",
|
|
44
|
+
"@mui/x-charts": "~8.28.2",
|
|
45
|
+
"@xylabs/react-animation": "~7.1.20",
|
|
46
|
+
"@xylabs/react-error": "~7.1.20",
|
|
47
|
+
"@xylabs/react-flexbox": "~7.1.20",
|
|
48
|
+
"@xylabs/react-quick-tip-button": "~7.1.20",
|
|
49
|
+
"@xylabs/react-shared": "~7.1.20",
|
|
50
|
+
"@xylabs/react-theme": "~7.1.20",
|
|
51
|
+
"@xylabs/sdk-js": "~5.0.95",
|
|
52
|
+
"@xyo-network/boundwitness-model": "~5.3.30",
|
|
62
53
|
"@xyo-network/react-boundwitness-plugin": "~7.5.8",
|
|
63
|
-
"@xyo-network/react-chain-blockies": "~1.20.15",
|
|
64
|
-
"@xyo-network/react-chain-provider": "~1.20.15",
|
|
65
|
-
"@xyo-network/react-chain-shared": "~1.20.15",
|
|
66
54
|
"@xyo-network/react-error": "~7.5.8",
|
|
67
55
|
"@xyo-network/react-event": "~7.5.8",
|
|
68
56
|
"@xyo-network/react-payload-raw-info": "~7.5.8",
|
|
69
57
|
"@xyo-network/react-payload-table": "~7.5.8",
|
|
70
58
|
"@xyo-network/react-shared": "~7.5.8",
|
|
71
59
|
"@xyo-network/react-table": "~7.5.8",
|
|
72
|
-
"@xyo-network/sdk-js": "~5.3.
|
|
73
|
-
"@xyo-network/xl1-sdk": "~1.26.
|
|
60
|
+
"@xyo-network/sdk-js": "~5.3.30",
|
|
61
|
+
"@xyo-network/xl1-sdk": "~1.26.20",
|
|
62
|
+
"@xyo-network/chain-protocol": "~1.20.17",
|
|
63
|
+
"@xyo-network/react-chain-provider": "~1.20.17",
|
|
64
|
+
"@xyo-network/chain-wrappers": "~1.20.17",
|
|
65
|
+
"@xyo-network/react-chain-shared": "~1.20.17",
|
|
66
|
+
"@xyo-network/chain-analyze": "~1.20.17"
|
|
74
67
|
},
|
|
75
68
|
"devDependencies": {
|
|
76
69
|
"@emotion/react": "~11.14.0",
|
|
77
70
|
"@emotion/styled": "~11.14.1",
|
|
78
71
|
"@mui/icons-material": "~7.3.9",
|
|
79
72
|
"@mui/material": "~7.3.9",
|
|
80
|
-
"@
|
|
73
|
+
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
74
|
+
"@opentelemetry/api": "^1",
|
|
75
|
+
"@storybook/react-vite": "^10.3.5",
|
|
81
76
|
"@textea/json-viewer": "~4.0.1",
|
|
77
|
+
"@types/node": "^25.5.2",
|
|
82
78
|
"@types/react": "~19.2.14",
|
|
83
|
-
"@xylabs/
|
|
84
|
-
"@xylabs/
|
|
85
|
-
"@xylabs/
|
|
86
|
-
"@xylabs/
|
|
87
|
-
"@xylabs/
|
|
88
|
-
"@xylabs/
|
|
89
|
-
"@xylabs/
|
|
90
|
-
"@
|
|
91
|
-
"@
|
|
92
|
-
"@
|
|
93
|
-
"@
|
|
94
|
-
"
|
|
79
|
+
"@xylabs/express": "^5.0.95",
|
|
80
|
+
"@xylabs/mongo": "^5.0.95",
|
|
81
|
+
"@xylabs/react-async-effect": "~7.1.20",
|
|
82
|
+
"@xylabs/react-button": "~7.1.20",
|
|
83
|
+
"@xylabs/react-dialogs": "~7.1.20",
|
|
84
|
+
"@xylabs/react-promise": "~7.1.20",
|
|
85
|
+
"@xylabs/ts-scripts-common": "~7.9.6",
|
|
86
|
+
"@xylabs/ts-scripts-pnpm": "~7.9.6",
|
|
87
|
+
"@xylabs/tsconfig": "~7.9.6",
|
|
88
|
+
"@xylabs/tsconfig-dom": "~7.9.6",
|
|
89
|
+
"@xylabs/tsconfig-react": "~7.9.6",
|
|
90
|
+
"@xylabs/zod": "~5.0.95",
|
|
91
|
+
"@xyo-network/account": "~5.3.30",
|
|
92
|
+
"@xyo-network/account-model": "~5.3.30",
|
|
93
|
+
"@xyo-network/api-models": "~5.3.30",
|
|
94
|
+
"@xyo-network/archivist-abstract": "~5.3.30",
|
|
95
|
+
"@xyo-network/archivist-generic": "~5.3.30",
|
|
96
|
+
"@xyo-network/archivist-memory": "~5.3.30",
|
|
97
|
+
"@xyo-network/archivist-model": "~5.3.30",
|
|
98
|
+
"@xyo-network/archivist-view": "~5.3.30",
|
|
99
|
+
"@xyo-network/archivist-wrapper": "~5.3",
|
|
100
|
+
"@xyo-network/boundwitness-builder": "~5.3.30",
|
|
101
|
+
"@xyo-network/boundwitness-validator": "~5.3.30",
|
|
102
|
+
"@xyo-network/bridge-abstract": "~5.3.30",
|
|
103
|
+
"@xyo-network/bridge-http": "~5.3.30",
|
|
104
|
+
"@xyo-network/bridge-model": "~5.3.30",
|
|
105
|
+
"@xyo-network/config-payload-plugin": "~5.3.30",
|
|
106
|
+
"@xyo-network/data": "~5.3.30",
|
|
107
|
+
"@xyo-network/diviner-abstract": "~5.3",
|
|
108
|
+
"@xyo-network/diviner-boundwitness-memory": "~5.3.30",
|
|
109
|
+
"@xyo-network/diviner-identity": "~5.3.30",
|
|
110
|
+
"@xyo-network/diviner-model": "~5.3.30",
|
|
111
|
+
"@xyo-network/diviner-payload-generic": "~5.3.30",
|
|
112
|
+
"@xyo-network/diviner-payload-model": "~5.3.30",
|
|
113
|
+
"@xyo-network/diviner-wrapper": "~5.3",
|
|
114
|
+
"@xyo-network/dns": "~5.3.30",
|
|
115
|
+
"@xyo-network/domain-payload-plugin": "~5.3.30",
|
|
116
|
+
"@xyo-network/elliptic": "~5.3.30",
|
|
117
|
+
"@xyo-network/hash": "~5.3.30",
|
|
118
|
+
"@xyo-network/huri": "~5.3.30",
|
|
119
|
+
"@xyo-network/manifest-model": "~5.3.30",
|
|
120
|
+
"@xyo-network/module-abstract": "~5.3.30",
|
|
121
|
+
"@xyo-network/module-model": "~5.3.30",
|
|
122
|
+
"@xyo-network/module-model-mongodb": "~5.3",
|
|
123
|
+
"@xyo-network/module-resolver": "~5.3.30",
|
|
124
|
+
"@xyo-network/module-wrapper": "~5.3",
|
|
125
|
+
"@xyo-network/network": "~5.3.30",
|
|
126
|
+
"@xyo-network/node-abstract": "~5.3.30",
|
|
127
|
+
"@xyo-network/node-memory": "~5.3.30",
|
|
128
|
+
"@xyo-network/node-model": "~5.3.30",
|
|
129
|
+
"@xyo-network/node-view": "~5.3.30",
|
|
130
|
+
"@xyo-network/node-wrapper": "~5.3",
|
|
131
|
+
"@xyo-network/payload-builder": "~5.3.30",
|
|
132
|
+
"@xyo-network/payload-model": "~5.3.30",
|
|
133
|
+
"@xyo-network/payload-validator": "~5.3.30",
|
|
134
|
+
"@xyo-network/previous-hash-store-model": "~5.3.30",
|
|
135
|
+
"@xyo-network/sentinel-abstract": "~5.3.30",
|
|
136
|
+
"@xyo-network/sentinel-memory": "~5.3.30",
|
|
137
|
+
"@xyo-network/sentinel-model": "~5.3.30",
|
|
138
|
+
"@xyo-network/wallet-model": "~5.3.30",
|
|
139
|
+
"@xyo-network/wasm": "~5.3.30",
|
|
140
|
+
"@xyo-network/witness-adhoc": "~5.3.30",
|
|
141
|
+
"@xyo-network/witness-model": "~5.3.30",
|
|
142
|
+
"ajv": "^8",
|
|
143
|
+
"axios": "^1.15.0",
|
|
144
|
+
"esbuild": "*",
|
|
95
145
|
"ethers": "^6.16.0",
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
146
|
+
"lmdb": "^3",
|
|
147
|
+
"mongodb": "^7.1.1",
|
|
148
|
+
"pako": "~2.1.0",
|
|
149
|
+
"react": "~19.2.5",
|
|
150
|
+
"react-dom": "~19.2.5",
|
|
151
|
+
"react-router-dom": "^7.14.0",
|
|
99
152
|
"rollbar": "^3.1.0",
|
|
100
|
-
"storybook": "^10.3.
|
|
153
|
+
"storybook": "^10.3.5",
|
|
101
154
|
"typescript": "~5.9.3",
|
|
102
|
-
"vite": "^8.0.
|
|
103
|
-
"zod": "^4.3.6"
|
|
155
|
+
"vite": "^8.0.8",
|
|
156
|
+
"zod": "^4.3.6",
|
|
157
|
+
"@xyo-network/chain-telemetry": "~1.20.17",
|
|
158
|
+
"@xyo-network/react-chain-blockies": "~1.20.17",
|
|
159
|
+
"@xyo-network/react-chain-network": "~1.20.17",
|
|
160
|
+
"@xyo-network/chain-services": "~1.20.17",
|
|
161
|
+
"@xyo-network/react-chain-client": "~1.20.17"
|
|
104
162
|
},
|
|
105
163
|
"peerDependencies": {
|
|
106
|
-
"@emotion/
|
|
107
|
-
"@
|
|
108
|
-
"@mui/
|
|
109
|
-
"@mui/
|
|
110
|
-
"@
|
|
111
|
-
"@
|
|
112
|
-
"@
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
164
|
+
"@emotion/styled": "~11.14.1",
|
|
165
|
+
"@mui/icons-material": "~7.3.9",
|
|
166
|
+
"@mui/material": "~7.3.9",
|
|
167
|
+
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
168
|
+
"@xylabs/express": "^5.0.95",
|
|
169
|
+
"@xylabs/react-async-effect": "~7.1.20",
|
|
170
|
+
"@xylabs/react-dialogs": "~7.1.20",
|
|
171
|
+
"@xylabs/react-promise": "~7.1.20",
|
|
172
|
+
"@xylabs/zod": "~5.0.95",
|
|
173
|
+
"@xyo-network/account": "~5.3.30",
|
|
174
|
+
"@xyo-network/account-model": "~5.3.30",
|
|
175
|
+
"@xyo-network/api-models": "~5.3.30",
|
|
176
|
+
"@xyo-network/archivist-abstract": "~5.3.30",
|
|
177
|
+
"@xyo-network/archivist-generic": "~5.3.30",
|
|
178
|
+
"@xyo-network/archivist-memory": "~5.3.30",
|
|
179
|
+
"@xyo-network/archivist-model": "~5.3.30",
|
|
180
|
+
"@xyo-network/archivist-view": "~5.3.30",
|
|
181
|
+
"@xyo-network/boundwitness-builder": "~5.3.30",
|
|
182
|
+
"@xyo-network/boundwitness-validator": "~5.3.30",
|
|
183
|
+
"@xyo-network/bridge-abstract": "~5.3.30",
|
|
184
|
+
"@xyo-network/bridge-model": "~5.3.30",
|
|
185
|
+
"@xyo-network/config-payload-plugin": "~5.3.30",
|
|
186
|
+
"@xyo-network/data": "~5.3.30",
|
|
187
|
+
"@xyo-network/diviner-boundwitness-memory": "~5.3.30",
|
|
188
|
+
"@xyo-network/diviner-identity": "~5.3.30",
|
|
189
|
+
"@xyo-network/diviner-model": "~5.3.30",
|
|
190
|
+
"@xyo-network/diviner-payload-generic": "~5.3.30",
|
|
191
|
+
"@xyo-network/diviner-payload-model": "~5.3.30",
|
|
192
|
+
"@xyo-network/dns": "~5.3.30",
|
|
193
|
+
"@xyo-network/domain-payload-plugin": "~5.3.30",
|
|
194
|
+
"@xyo-network/elliptic": "~5.3.30",
|
|
195
|
+
"@xyo-network/hash": "~5.3.30",
|
|
196
|
+
"@xyo-network/huri": "~5.3.30",
|
|
197
|
+
"@xyo-network/manifest-model": "~5.3.30",
|
|
198
|
+
"@xyo-network/module-abstract": "~5.3.30",
|
|
199
|
+
"@xyo-network/module-model": "~5.3.30",
|
|
200
|
+
"@xyo-network/module-model-mongodb": "~5.3",
|
|
201
|
+
"@xyo-network/module-resolver": "~5.3.30",
|
|
202
|
+
"@xyo-network/network": "~5.3.30",
|
|
203
|
+
"@xyo-network/node-abstract": "~5.3.30",
|
|
204
|
+
"@xyo-network/node-memory": "~5.3.30",
|
|
205
|
+
"@xyo-network/node-model": "~5.3.30",
|
|
206
|
+
"@xyo-network/node-view": "~5.3.30",
|
|
207
|
+
"@xyo-network/payload-builder": "~5.3.30",
|
|
208
|
+
"@xyo-network/payload-model": "~5.3.30",
|
|
209
|
+
"@xyo-network/payload-validator": "~5.3.30",
|
|
210
|
+
"@xyo-network/previous-hash-store-model": "~5.3.30",
|
|
211
|
+
"@xyo-network/sentinel-abstract": "~5.3.30",
|
|
212
|
+
"@xyo-network/sentinel-memory": "~5.3.30",
|
|
213
|
+
"@xyo-network/sentinel-model": "~5.3.30",
|
|
214
|
+
"@xyo-network/wallet-model": "~5.3.30",
|
|
215
|
+
"@xyo-network/wasm": "~5.3.30",
|
|
216
|
+
"@xyo-network/witness-adhoc": "~5.3.30",
|
|
217
|
+
"@xyo-network/witness-model": "~5.3.30",
|
|
218
|
+
"axios": "^1.14.0",
|
|
219
|
+
"pako": "~2.1.0",
|
|
220
|
+
"react": "~19.2.4",
|
|
221
|
+
"@xyo-network/chain-services": "~1.20.17",
|
|
222
|
+
"@xyo-network/react-chain-client": "~1.20.17",
|
|
223
|
+
"@xyo-network/react-chain-blockies": "~1.20.17",
|
|
224
|
+
"@xyo-network/chain-telemetry": "~1.20.17"
|
|
119
225
|
},
|
|
120
226
|
"publishConfig": {
|
|
121
227
|
"access": "restricted"
|
|
122
228
|
},
|
|
123
|
-
"docs": "dist/docs.json"
|
|
124
|
-
|
|
229
|
+
"docs": "dist/docs.json",
|
|
230
|
+
"scripts": {
|
|
231
|
+
"package-cycle": "echo Nothing to do"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Button,
|
|
3
|
-
Dialog, DialogActions, DialogContent, type DialogProps, DialogTitle,
|
|
4
|
-
} from '@mui/material'
|
|
5
|
-
import type { FC } from 'react'
|
|
6
|
-
import React from 'react'
|
|
7
|
-
|
|
8
|
-
export const FeatureNotAvailable: FC<DialogProps & { featureName?: string }> = ({ featureName = 'Feature', ...props }) => (
|
|
9
|
-
<Dialog {...props}>
|
|
10
|
-
<DialogTitle>
|
|
11
|
-
{`${featureName} Not Available`}
|
|
12
|
-
</DialogTitle>
|
|
13
|
-
<DialogContent>This feature is not currently available. Either you do not have access to it or it is currently undergoing maintenance.</DialogContent>
|
|
14
|
-
<DialogActions>
|
|
15
|
-
<Button onClick={e => props.onClose?.(e, 'backdropClick')}>
|
|
16
|
-
Close
|
|
17
|
-
</Button>
|
|
18
|
-
</DialogActions>
|
|
19
|
-
</Dialog>
|
|
20
|
-
)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryFn } from '@storybook/react-vite'
|
|
2
|
-
import type { Address } from '@xylabs/sdk-js'
|
|
3
|
-
import { SequenceNetworkGatewayDecorator } from '@xyo-network/react-chain-network'
|
|
4
|
-
import { useViewerFromGateway } from '@xyo-network/react-chain-provider'
|
|
5
|
-
|
|
6
|
-
import { AccountBalanceHistoryFlexBox } from './BalanceHistoryFlexbox.tsx'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'AccountBalanceHistory/FlexBox',
|
|
10
|
-
component: AccountBalanceHistoryFlexBox,
|
|
11
|
-
decorators: [SequenceNetworkGatewayDecorator],
|
|
12
|
-
} as Meta
|
|
13
|
-
|
|
14
|
-
const Template: StoryFn<typeof AccountBalanceHistoryFlexBox> = (args) => {
|
|
15
|
-
const viewer = useViewerFromGateway()
|
|
16
|
-
return <AccountBalanceHistoryFlexBox viewer={viewer} {...args} />
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const Default = Template.bind({})
|
|
20
|
-
Default.args = {
|
|
21
|
-
address: '2b1a21d8c90e658d8bf1e2aad31c8dc892c353c1' as Address,
|
|
22
|
-
refresh: 0,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { Default }
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Typography } from '@mui/material'
|
|
2
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
-
import { FlexCol } from '@xylabs/react-flexbox'
|
|
4
|
-
import { type Address } from '@xylabs/sdk-js'
|
|
5
|
-
import { isDefined } from '@xylabs/sdk-js'
|
|
6
|
-
import { useAccountBalanceHistory } from '@xyo-network/react-chain-provider'
|
|
7
|
-
import { ErrorRender } from '@xyo-network/react-error'
|
|
8
|
-
import type { XyoViewer } from '@xyo-network/xl1-sdk'
|
|
9
|
-
import { AttoXL1 } from '@xyo-network/xl1-sdk'
|
|
10
|
-
import React from 'react'
|
|
11
|
-
|
|
12
|
-
import { formatBalanceMagnitude } from './helpers/index.ts'
|
|
13
|
-
import { AccountBalanceHistoryTableEx } from './table/index.ts'
|
|
14
|
-
|
|
15
|
-
export interface AccountBalanceHistoryFlexBoxProps extends FlexBoxProps {
|
|
16
|
-
address?: Address
|
|
17
|
-
refresh?: number
|
|
18
|
-
viewer?: XyoViewer
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const AccountBalanceHistoryFlexBox: React.FC<AccountBalanceHistoryFlexBoxProps> = ({
|
|
22
|
-
address, refresh, viewer, ...props
|
|
23
|
-
}) => {
|
|
24
|
-
const [results, error] = useAccountBalanceHistory(address, viewer, undefined, undefined, refresh)
|
|
25
|
-
const {
|
|
26
|
-
history, balance, truncated,
|
|
27
|
-
} = results || { balance: [AttoXL1(0n), AttoXL1(0n)], history: undefined }
|
|
28
|
-
|
|
29
|
-
return isDefined(history) && isDefined(address)
|
|
30
|
-
? (
|
|
31
|
-
<FlexCol {...props}>
|
|
32
|
-
<ErrorRender error={error} scope="AccountBalanceHistoryTable" />
|
|
33
|
-
<Typography variant="h6" gutterBottom>
|
|
34
|
-
{formatBalanceMagnitude(balance)}
|
|
35
|
-
</Typography>
|
|
36
|
-
{truncated
|
|
37
|
-
? (
|
|
38
|
-
<Typography variant="caption" gutterBottom>
|
|
39
|
-
Ranged Balance from
|
|
40
|
-
{' '}
|
|
41
|
-
{history.at(-1)!.blockNumber}
|
|
42
|
-
{' '}
|
|
43
|
-
-
|
|
44
|
-
{' '}
|
|
45
|
-
{history[0].blockNumber}
|
|
46
|
-
</Typography>
|
|
47
|
-
)
|
|
48
|
-
: null}
|
|
49
|
-
<AccountBalanceHistoryTableEx history={history} />
|
|
50
|
-
</FlexCol>
|
|
51
|
-
)
|
|
52
|
-
: null
|
|
53
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type AttoXL1, XL1Amount } from '@xyo-network/xl1-sdk'
|
|
2
|
-
|
|
3
|
-
export const formatBalanceMagnitude = (set: [AttoXL1, AttoXL1]) => {
|
|
4
|
-
const [received, sent] = set
|
|
5
|
-
const netBalance = received - sent
|
|
6
|
-
return netBalance < 0n ? `-${formatBalance(sent - received)}` : formatBalance(netBalance)
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const formatBalance = (balance: bigint) => {
|
|
10
|
-
const xl1Amount = new XL1Amount(balance)
|
|
11
|
-
return xl1Amount.toString(undefined, {
|
|
12
|
-
places: 18, maxDecimal: 12, maxCharacters: 12, minDecimals: 1, locale: navigator.language,
|
|
13
|
-
})
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './formatBalanceMagnitude.ts'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './usePagedAccountBalanceHistory.ts'
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Address } from '@xylabs/sdk-js'
|
|
2
|
-
import { isDefined } from '@xylabs/sdk-js'
|
|
3
|
-
import type { AccountBalanceHistoryItemFormatted } from '@xyo-network/react-chain-provider'
|
|
4
|
-
import { useAccountBalanceHistory } from '@xyo-network/react-chain-provider'
|
|
5
|
-
import type { XL1BlockRange, XyoViewer } from '@xyo-network/xl1-sdk'
|
|
6
|
-
import { useCallback, useState } from 'react'
|
|
7
|
-
|
|
8
|
-
export const usePagedAccountBalanceHistory = (address?: Address, viewer?: XyoViewer, maxPage = 1) => {
|
|
9
|
-
const [updatedBlockRange, setUpdatedBlockRange] = useState<XL1BlockRange>()
|
|
10
|
-
const [pagedHistory, setPagedHistory] = useState<AccountBalanceHistoryItemFormatted[]>()
|
|
11
|
-
const [results, error, loading] = useAccountBalanceHistory(address, viewer, maxPage, updatedBlockRange)
|
|
12
|
-
|
|
13
|
-
const { history, truncated } = results || {}
|
|
14
|
-
const [previousHistory, setPreviousHistory] = useState(history)
|
|
15
|
-
|
|
16
|
-
// Reset paged history when address changes
|
|
17
|
-
if (isDefined(history) && history !== previousHistory) {
|
|
18
|
-
setPagedHistory([...pagedHistory ?? [], ...history])
|
|
19
|
-
setPreviousHistory(history)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const lastBlock = isDefined(history) ? history.at(-1)?.blockNumber : undefined
|
|
23
|
-
const historyComplete = (isDefined(history) && history.length === 0) || lastBlock === 0
|
|
24
|
-
|
|
25
|
-
const updateRange = useCallback(() => {
|
|
26
|
-
if (isDefined(lastBlock) && lastBlock > 0 && truncated) {
|
|
27
|
-
const newEndBlock = lastBlock - 1
|
|
28
|
-
setUpdatedBlockRange([0, newEndBlock] as XL1BlockRange)
|
|
29
|
-
}
|
|
30
|
-
}, [lastBlock, truncated])
|
|
31
|
-
|
|
32
|
-
return {
|
|
33
|
-
pagedHistory,
|
|
34
|
-
historyComplete,
|
|
35
|
-
updateRange,
|
|
36
|
-
error,
|
|
37
|
-
loading,
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Alert, AlertTitle, LinearProgress, Snackbar, Stack,
|
|
3
|
-
} from '@mui/material'
|
|
4
|
-
import type { Meta, StoryFn } from '@storybook/react-vite'
|
|
5
|
-
import { ButtonEx } from '@xylabs/react-button'
|
|
6
|
-
import { type Address, isDefined } from '@xylabs/sdk-js'
|
|
7
|
-
import { SequenceNetworkGatewayDecorator, useViewerInPage } from '@xyo-network/react-chain-network'
|
|
8
|
-
import { useAccountBalanceHistory, useViewerFromGateway } from '@xyo-network/react-chain-provider'
|
|
9
|
-
import { ErrorRender } from '@xyo-network/react-error'
|
|
10
|
-
import type { Event } from '@xyo-network/react-event'
|
|
11
|
-
import { useEvent } from '@xyo-network/react-event'
|
|
12
|
-
import type { XL1BlockRange } from '@xyo-network/xl1-sdk'
|
|
13
|
-
import { useState } from 'react'
|
|
14
|
-
|
|
15
|
-
import { usePagedAccountBalanceHistory } from '../hooks/index.ts'
|
|
16
|
-
import { AccountBalanceHistoryTableEx } from './BalanceHistoryTableEx.tsx'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
title: 'AccountBalanceHistory/TableEx',
|
|
20
|
-
component: AccountBalanceHistoryTableEx,
|
|
21
|
-
decorators: [SequenceNetworkGatewayDecorator],
|
|
22
|
-
} as Meta
|
|
23
|
-
|
|
24
|
-
const TEST_ADDRESS = 'aa9401662e9cd3ce8bb8a6ab92a35ed83e85ac67' as Address
|
|
25
|
-
|
|
26
|
-
const TEST_ADDRESS_1 = '2b1a21d8c90e658d8bf1e2aad31c8dc892c353c1' as Address
|
|
27
|
-
|
|
28
|
-
const useFetchBalanceHistory = (address?: Address, maxPage = 10, blockRange?: XL1BlockRange) => {
|
|
29
|
-
const viewer = useViewerFromGateway()
|
|
30
|
-
return useAccountBalanceHistory(address, viewer, maxPage, blockRange)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const Template: StoryFn<typeof AccountBalanceHistoryTableEx> = (args) => {
|
|
34
|
-
const results = useFetchBalanceHistory(TEST_ADDRESS)
|
|
35
|
-
const [history, error, loading] = results
|
|
36
|
-
return (
|
|
37
|
-
<>
|
|
38
|
-
<ErrorRender error={error} scope="AccountBalanceHistoryTableStory" />
|
|
39
|
-
{loading === 'pending' ? <LinearProgress /> : null}
|
|
40
|
-
<AccountBalanceHistoryTableEx history={history?.history} {...args} />
|
|
41
|
-
</>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const TemplateLinked: StoryFn<typeof AccountBalanceHistoryTableEx> = (args) => {
|
|
46
|
-
const [event, setEvent] = useState<Event>()
|
|
47
|
-
const [ref] = useEvent<HTMLTableElement>((noun, verb, data) => setEvent({
|
|
48
|
-
noun, verb, data,
|
|
49
|
-
}))
|
|
50
|
-
|
|
51
|
-
const results = useFetchBalanceHistory(TEST_ADDRESS_1)
|
|
52
|
-
const [history, error, loading] = results
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<>
|
|
56
|
-
<ErrorRender error={error} scope="AccountBalanceHistoryTableStory" />
|
|
57
|
-
{loading === 'pending' ? <LinearProgress /> : null}
|
|
58
|
-
<AccountBalanceHistoryTableEx history={history?.history} ref={ref} {...args} />
|
|
59
|
-
<Snackbar autoHideDuration={5000} open={!!event} onClose={() => setEvent(undefined)}>
|
|
60
|
-
<Alert>
|
|
61
|
-
<AlertTitle>
|
|
62
|
-
Event -
|
|
63
|
-
{' '}
|
|
64
|
-
{event?.noun}
|
|
65
|
-
</AlertTitle>
|
|
66
|
-
<pre>{JSON.stringify(event, null, 2)}</pre>
|
|
67
|
-
</Alert>
|
|
68
|
-
</Snackbar>
|
|
69
|
-
</>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const TemplatePaged: StoryFn<typeof AccountBalanceHistoryTableEx> = (args) => {
|
|
74
|
-
const viewer = useViewerInPage()
|
|
75
|
-
const {
|
|
76
|
-
pagedHistory, historyComplete, updateRange, error, loading,
|
|
77
|
-
} = usePagedAccountBalanceHistory(TEST_ADDRESS_1, viewer, 1)
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<Stack gap={2}>
|
|
81
|
-
<ErrorRender error={error} scope="AccountBalanceHistoryTableStory" />
|
|
82
|
-
{loading === 'pending' ? <LinearProgress /> : null}
|
|
83
|
-
<AccountBalanceHistoryTableEx history={pagedHistory} {...args} />
|
|
84
|
-
{isDefined(pagedHistory)
|
|
85
|
-
? (
|
|
86
|
-
<ButtonEx
|
|
87
|
-
variant="contained"
|
|
88
|
-
onClick={updateRange}
|
|
89
|
-
disabled={loading === 'pending' || historyComplete}
|
|
90
|
-
loading={loading === 'pending'}
|
|
91
|
-
>
|
|
92
|
-
{historyComplete ? 'End of History' : 'More History'}
|
|
93
|
-
</ButtonEx>
|
|
94
|
-
)
|
|
95
|
-
: null}
|
|
96
|
-
</Stack>
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const Default = Template.bind({})
|
|
101
|
-
Default.args = {}
|
|
102
|
-
|
|
103
|
-
const WithLinked = TemplateLinked.bind({})
|
|
104
|
-
WithLinked.args = { linked: true }
|
|
105
|
-
|
|
106
|
-
const WithPaged = TemplatePaged.bind({})
|
|
107
|
-
WithPaged.args = {}
|
|
108
|
-
|
|
109
|
-
export {
|
|
110
|
-
Default, WithLinked, WithPaged,
|
|
111
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TableBody, TableCell, TableHead, TableRow,
|
|
3
|
-
} from '@mui/material'
|
|
4
|
-
import { isDefined } from '@xylabs/sdk-js'
|
|
5
|
-
import type { AccountBalanceHistoryItemFormatted } from '@xyo-network/react-chain-provider'
|
|
6
|
-
import type { TableExProps } from '@xyo-network/react-table'
|
|
7
|
-
import { TableEx } from '@xyo-network/react-table'
|
|
8
|
-
import React from 'react'
|
|
9
|
-
|
|
10
|
-
import { BalanceHistoryTableRow } from './BalanceHistoryTableRow.tsx'
|
|
11
|
-
import { TableHeadingLabels } from './types/index.ts'
|
|
12
|
-
|
|
13
|
-
export interface AccountBalanceHistoryTableExProps extends TableExProps {
|
|
14
|
-
history?: AccountBalanceHistoryItemFormatted[]
|
|
15
|
-
linked?: boolean
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const AccountBalanceHistoryTableEx: React.FC<AccountBalanceHistoryTableExProps> = ({
|
|
19
|
-
history, linked, ...props
|
|
20
|
-
}) => {
|
|
21
|
-
return isDefined(history)
|
|
22
|
-
? (
|
|
23
|
-
<TableEx {...props}>
|
|
24
|
-
<TableHead>
|
|
25
|
-
<TableRow>
|
|
26
|
-
{TableHeadingLabels.map(heading => (
|
|
27
|
-
<TableCell key={heading}>{heading}</TableCell>
|
|
28
|
-
))}
|
|
29
|
-
</TableRow>
|
|
30
|
-
</TableHead>
|
|
31
|
-
<TableBody>
|
|
32
|
-
{history?.map(row => <BalanceHistoryTableRow key={row.key} linked={linked} row={row} />)}
|
|
33
|
-
</TableBody>
|
|
34
|
-
</TableEx>
|
|
35
|
-
)
|
|
36
|
-
: null
|
|
37
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Table, TableBody } from '@mui/material'
|
|
2
|
-
import type { Meta, StoryFn } from '@storybook/react-vite'
|
|
3
|
-
import type { Address, Hash } from '@xylabs/sdk-js'
|
|
4
|
-
import type { AccountBalanceHistoryItemFormatted } from '@xyo-network/react-chain-provider'
|
|
5
|
-
import type { AccountBalanceHistoryItem } from '@xyo-network/xl1-sdk'
|
|
6
|
-
import React from 'react'
|
|
7
|
-
|
|
8
|
-
import { BalanceHistoryTableRow } from './BalanceHistoryTableRow.tsx'
|
|
9
|
-
|
|
10
|
-
const sampleRow: AccountBalanceHistoryItemFormatted = {
|
|
11
|
-
amount: 866_949_573_941_165_034_031n,
|
|
12
|
-
blockNumber: 652_126,
|
|
13
|
-
blockHash: 'abc123456789abcdef123456789abcdef123456789abcdef123456789abcdef' as Hash,
|
|
14
|
-
debug: undefined as unknown as AccountBalanceHistoryItem,
|
|
15
|
-
from: '626cfa5650444825a1633287a0b4bc8a55f54735' as Address,
|
|
16
|
-
key: 'a80ee574-1c52-46bc-a5df-bbd9b9b8082e',
|
|
17
|
-
timestamp: 1_769_423_309_664,
|
|
18
|
-
to: 'd50a55aa2f6c9416cf8ecc9ef4790260564a7ec7' as Address,
|
|
19
|
-
txHash: '123456789abcdef123456789abcdef123456789abcdef123456789abcdef1234' as Hash,
|
|
20
|
-
transferHash: '123456789abcdef123456789abcdef123456789abcdef123456789abcdef1234' as Hash,
|
|
21
|
-
type: 'receive',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
title: 'AccountBalanceHistory/TableRow',
|
|
26
|
-
component: BalanceHistoryTableRow,
|
|
27
|
-
} as Meta<typeof BalanceHistoryTableRow>
|
|
28
|
-
|
|
29
|
-
const Template: StoryFn<typeof BalanceHistoryTableRow> = args => (
|
|
30
|
-
<Table>
|
|
31
|
-
<TableBody>
|
|
32
|
-
<BalanceHistoryTableRow {...args} />
|
|
33
|
-
</TableBody>
|
|
34
|
-
</Table>
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
const Default = Template.bind({})
|
|
38
|
-
Default.args = { row: sampleRow }
|
|
39
|
-
|
|
40
|
-
const WithLinked = Template.bind({})
|
|
41
|
-
WithLinked.args = { row: sampleRow, linked: true }
|
|
42
|
-
|
|
43
|
-
const WithNoTxHash = Template.bind({})
|
|
44
|
-
WithNoTxHash.args = {
|
|
45
|
-
row: {
|
|
46
|
-
...sampleRow,
|
|
47
|
-
txHash: undefined,
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export {
|
|
52
|
-
Default, WithLinked, WithNoTxHash,
|
|
53
|
-
}
|