@xyo-network/react-chain-blockchain 1.16.8 → 1.16.10
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/components/account/BalanceHistoryFlexbox.d.ts +11 -0
- package/dist/browser/components/account/BalanceHistoryFlexbox.d.ts.map +1 -0
- package/dist/browser/components/account/BalanceHistoryFlexbox.stories.d.ts +6 -0
- package/dist/browser/components/account/BalanceHistoryFlexbox.stories.d.ts.map +1 -0
- package/dist/browser/components/account/index.d.ts +3 -0
- package/dist/browser/components/account/index.d.ts.map +1 -0
- package/dist/browser/components/account/table/AddressTableCell.d.ts +8 -0
- package/dist/browser/components/account/table/AddressTableCell.d.ts.map +1 -0
- package/dist/browser/components/account/table/BalanceHistoryTable.d.ts +9 -0
- package/dist/browser/components/account/table/BalanceHistoryTable.d.ts.map +1 -0
- package/dist/browser/components/account/table/BalanceHistoryTable.stories.d.ts +7 -0
- package/dist/browser/components/account/table/BalanceHistoryTable.stories.d.ts.map +1 -0
- package/dist/browser/components/account/table/BalanceHistoryTableRow.d.ts +8 -0
- package/dist/browser/components/account/table/BalanceHistoryTableRow.d.ts.map +1 -0
- package/dist/browser/components/account/table/RawAmountTableCell.d.ts +9 -0
- package/dist/browser/components/account/table/RawAmountTableCell.d.ts.map +1 -0
- package/dist/browser/components/account/table/index.d.ts +5 -0
- package/dist/browser/components/account/table/index.d.ts.map +1 -0
- package/dist/browser/components/account/table/types/index.d.ts +9 -0
- package/dist/browser/components/account/table/types/index.d.ts.map +1 -0
- package/dist/browser/components/block/helpers/blockProducer.d.ts +1 -3
- package/dist/browser/components/block/helpers/blockProducer.d.ts.map +1 -1
- package/dist/browser/components/block/hooks/useBlockProducer.d.ts +1 -3
- package/dist/browser/components/block/hooks/useBlockProducer.d.ts.map +1 -1
- package/dist/browser/components/block/table/cell/BlockNumber.d.ts +1 -0
- package/dist/browser/components/block/table/cell/BlockNumber.d.ts.map +1 -1
- package/dist/browser/components/index.d.ts +1 -0
- package/dist/browser/components/index.d.ts.map +1 -1
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts +3 -9
- package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts.map +1 -1
- package/dist/browser/index.mjs +454 -267
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +25 -21
- package/src/components/account/BalanceHistoryFlexbox.stories.tsx +25 -0
- package/src/components/account/BalanceHistoryFlexbox.tsx +65 -0
- package/src/components/account/index.ts +2 -0
- package/src/components/account/table/AddressTableCell.tsx +25 -0
- package/src/components/account/table/BalanceHistoryTable.stories.tsx +75 -0
- package/src/components/account/table/BalanceHistoryTable.tsx +36 -0
- package/src/components/account/table/BalanceHistoryTableRow.tsx +41 -0
- package/src/components/account/table/RawAmountTableCell.tsx +53 -0
- package/src/components/account/table/index.ts +4 -0
- package/src/components/account/table/types/index.ts +17 -0
- package/src/components/block/table/Ex.stories.tsx +1 -1
- package/src/components/block/table/cell/BlockNumber.tsx +8 -3
- package/src/components/index.ts +1 -0
package/dist/browser/index.mjs
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
+
// src/components/account/BalanceHistoryFlexbox.tsx
|
|
5
|
+
import { Typography as Typography6 } from "@mui/material";
|
|
6
|
+
import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
|
|
7
|
+
import { isDefined as isDefined6 } from "@xylabs/typeof";
|
|
8
|
+
import { useAccountBalanceHistory } from "@xyo-network/react-chain-provider";
|
|
9
|
+
import { ErrorRender as ErrorRender3 } from "@xyo-network/react-error";
|
|
10
|
+
import { AttoXL1, XL1Amount as XL1Amount2 } from "@xyo-network/xl1-protocol";
|
|
11
|
+
import React28 from "react";
|
|
12
|
+
|
|
13
|
+
// src/components/account/table/AddressTableCell.tsx
|
|
14
|
+
import { TableCell as TableCell10, Tooltip as Tooltip8 } from "@mui/material";
|
|
15
|
+
import { useEvent as useEvent4 } from "@xyo-network/react-event";
|
|
16
|
+
|
|
4
17
|
// src/components/block/BlockHeadingFlexbox.tsx
|
|
5
18
|
import { FlexCol as FlexCol2, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
|
|
6
19
|
import { BWVerification, HashHeadingPaper } from "@xyo-network/react-boundwitness-plugin";
|
|
7
20
|
import { usePayloadHash } from "@xyo-network/react-shared";
|
|
8
|
-
import
|
|
21
|
+
import React14 from "react";
|
|
9
22
|
|
|
10
23
|
// src/context/analyzer/context.ts
|
|
11
24
|
import { createContextEx } from "@xylabs/react-shared";
|
|
@@ -13,7 +26,7 @@ var ChainAnalyzersContext = createContextEx();
|
|
|
13
26
|
|
|
14
27
|
// src/context/analyzer/Provider.tsx
|
|
15
28
|
import { isUndefined } from "@xylabs/typeof";
|
|
16
|
-
import
|
|
29
|
+
import React2, { useCallback, useMemo, useState } from "react";
|
|
17
30
|
var ChainAnalyzersProvider = /* @__PURE__ */ __name(({ analyzers: analyzersProp, children }) => {
|
|
18
31
|
const [analyzersState, setAnalyzersState] = useState(analyzersProp ?? {});
|
|
19
32
|
const [statsUpdated, setStatsUpdated] = useState(Date.now());
|
|
@@ -51,7 +64,7 @@ var ChainAnalyzersProvider = /* @__PURE__ */ __name(({ analyzers: analyzersProp,
|
|
|
51
64
|
onBlock,
|
|
52
65
|
statsUpdated
|
|
53
66
|
]);
|
|
54
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ React2.createElement(ChainAnalyzersContext, {
|
|
55
68
|
value
|
|
56
69
|
}, children);
|
|
57
70
|
}, "ChainAnalyzersProvider");
|
|
@@ -65,7 +78,7 @@ import { createContextEx as createContextEx2 } from "@xylabs/react-shared";
|
|
|
65
78
|
var ChainInfoContext = createContextEx2();
|
|
66
79
|
|
|
67
80
|
// src/context/chain/Provider.tsx
|
|
68
|
-
import
|
|
81
|
+
import React3, { useMemo as useMemo2, useState as useState2 } from "react";
|
|
69
82
|
var ChainInfoProvider = /* @__PURE__ */ __name(({ children, chainArchivist: chainArchivistProp, chainId: chainIdProp, chainIterator: chainIteratorProp }) => {
|
|
70
83
|
const [chainArchivist, setChainArchivist] = useState2(chainArchivistProp);
|
|
71
84
|
const [chainId, setChainId] = useState2(chainIdProp);
|
|
@@ -110,7 +123,7 @@ var ChainInfoProvider = /* @__PURE__ */ __name(({ children, chainArchivist: chai
|
|
|
110
123
|
updateChainId,
|
|
111
124
|
updateChainIterator
|
|
112
125
|
]);
|
|
113
|
-
return /* @__PURE__ */
|
|
126
|
+
return /* @__PURE__ */ React3.createElement(ChainInfoContext, {
|
|
114
127
|
value: chainState
|
|
115
128
|
}, children);
|
|
116
129
|
}, "ChainInfoProvider");
|
|
@@ -128,7 +141,7 @@ import { Button, FormControl, TextField } from "@mui/material";
|
|
|
128
141
|
import { toHex } from "@xylabs/hex";
|
|
129
142
|
import { FlexCol } from "@xylabs/react-flexbox";
|
|
130
143
|
import { defaultTransactionFees } from "@xyo-network/xl1-protocol";
|
|
131
|
-
import
|
|
144
|
+
import React4 from "react";
|
|
132
145
|
var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
|
|
133
146
|
const handleSubmit = /* @__PURE__ */ __name(async (event) => {
|
|
134
147
|
event.preventDefault();
|
|
@@ -146,38 +159,38 @@ var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
|
|
|
146
159
|
};
|
|
147
160
|
await onSubmitTx?.(chainTx);
|
|
148
161
|
}, "handleSubmit");
|
|
149
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ React4.createElement("form", {
|
|
150
163
|
onSubmit: /* @__PURE__ */ __name((event) => void handleSubmit(event), "onSubmit"),
|
|
151
164
|
style: {
|
|
152
165
|
width: "100%"
|
|
153
166
|
}
|
|
154
|
-
}, /* @__PURE__ */
|
|
167
|
+
}, /* @__PURE__ */ React4.createElement(FlexCol, {
|
|
155
168
|
gap: 2
|
|
156
|
-
}, /* @__PURE__ */
|
|
169
|
+
}, /* @__PURE__ */ React4.createElement(FormControl, {
|
|
157
170
|
fullWidth: true
|
|
158
|
-
}, /* @__PURE__ */
|
|
171
|
+
}, /* @__PURE__ */ React4.createElement(TextField, {
|
|
159
172
|
label: "Chain Address",
|
|
160
173
|
name: "chain",
|
|
161
174
|
required: true
|
|
162
|
-
})), /* @__PURE__ */
|
|
175
|
+
})), /* @__PURE__ */ React4.createElement(FormControl, {
|
|
163
176
|
fullWidth: true
|
|
164
|
-
}, /* @__PURE__ */
|
|
177
|
+
}, /* @__PURE__ */ React4.createElement(TextField, {
|
|
165
178
|
label: "Gas",
|
|
166
179
|
name: "gas",
|
|
167
180
|
required: true
|
|
168
|
-
})), /* @__PURE__ */
|
|
181
|
+
})), /* @__PURE__ */ React4.createElement(FormControl, {
|
|
169
182
|
fullWidth: true
|
|
170
|
-
}, /* @__PURE__ */
|
|
183
|
+
}, /* @__PURE__ */ React4.createElement(TextField, {
|
|
171
184
|
label: "Not Before Block",
|
|
172
185
|
name: "nbf",
|
|
173
186
|
required: true
|
|
174
|
-
})), /* @__PURE__ */
|
|
187
|
+
})), /* @__PURE__ */ React4.createElement(FormControl, {
|
|
175
188
|
fullWidth: true
|
|
176
|
-
}, /* @__PURE__ */
|
|
189
|
+
}, /* @__PURE__ */ React4.createElement(TextField, {
|
|
177
190
|
label: "Not After Block",
|
|
178
191
|
name: "exp",
|
|
179
192
|
required: true
|
|
180
|
-
})), /* @__PURE__ */
|
|
193
|
+
})), /* @__PURE__ */ React4.createElement(Button, {
|
|
181
194
|
type: "submit",
|
|
182
195
|
variant: "contained"
|
|
183
196
|
}, "Submit")));
|
|
@@ -185,7 +198,7 @@ var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
|
|
|
185
198
|
|
|
186
199
|
// src/components/transactions/submit/Network.tsx
|
|
187
200
|
import { FormControl as FormControl2, FormHelperText, TextField as TextField2 } from "@mui/material";
|
|
188
|
-
import
|
|
201
|
+
import React5, { useState as useState3 } from "react";
|
|
189
202
|
var ChainTransactionNetwork = /* @__PURE__ */ __name(({ network, onNetworkChange, ...props }) => {
|
|
190
203
|
const [error, setError] = useState3();
|
|
191
204
|
const handleChange = /* @__PURE__ */ __name((event) => {
|
|
@@ -198,16 +211,16 @@ var ChainTransactionNetwork = /* @__PURE__ */ __name(({ network, onNetworkChange
|
|
|
198
211
|
setError(error2);
|
|
199
212
|
}
|
|
200
213
|
}, "handleChange");
|
|
201
|
-
return /* @__PURE__ */
|
|
214
|
+
return /* @__PURE__ */ React5.createElement(FormControl2, {
|
|
202
215
|
fullWidth: true
|
|
203
|
-
}, /* @__PURE__ */
|
|
216
|
+
}, /* @__PURE__ */ React5.createElement(TextField2, {
|
|
204
217
|
label: "Network",
|
|
205
218
|
name: "network",
|
|
206
219
|
onChange: handleChange,
|
|
207
220
|
required: true,
|
|
208
221
|
value: network,
|
|
209
222
|
...props
|
|
210
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ React5.createElement(FormHelperText, {
|
|
211
224
|
sx: {
|
|
212
225
|
color: error ? "red" : void 0
|
|
213
226
|
}
|
|
@@ -224,7 +237,7 @@ import { ArchivistInsertQuerySchema } from "@xyo-network/archivist-model";
|
|
|
224
237
|
import { QueryBoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
|
|
225
238
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
226
239
|
import { buildTransaction } from "@xyo-network/xl1-protocol-sdk";
|
|
227
|
-
import
|
|
240
|
+
import React6, { useState as useState4 } from "react";
|
|
228
241
|
var BETA_PENDING_TRANSACTIONS_ARCHIVIST = "https://beta.api.chain.xyo.network/8050fee682a2762f504d5449d8269a6f17f0b693";
|
|
229
242
|
var defaultNetwork = new URL(BETA_PENDING_TRANSACTIONS_ARCHIVIST);
|
|
230
243
|
var SubmitChainTransaction = /* @__PURE__ */ __name(() => {
|
|
@@ -259,37 +272,37 @@ var SubmitChainTransaction = /* @__PURE__ */ __name(() => {
|
|
|
259
272
|
const onNetworkChange = /* @__PURE__ */ __name((url) => {
|
|
260
273
|
setNetwork(url);
|
|
261
274
|
}, "onNetworkChange");
|
|
262
|
-
return /* @__PURE__ */
|
|
275
|
+
return /* @__PURE__ */ React6.createElement(Grid, {
|
|
263
276
|
container: true
|
|
264
|
-
}, /* @__PURE__ */
|
|
277
|
+
}, /* @__PURE__ */ React6.createElement(Grid, {
|
|
265
278
|
size: {
|
|
266
279
|
xs: 12,
|
|
267
280
|
sm: 6,
|
|
268
281
|
md: 4
|
|
269
282
|
}
|
|
270
|
-
}, /* @__PURE__ */
|
|
283
|
+
}, /* @__PURE__ */ React6.createElement(FlexGrowCol, {
|
|
271
284
|
alignItems: "start",
|
|
272
285
|
gap: 2
|
|
273
|
-
}, /* @__PURE__ */
|
|
286
|
+
}, /* @__PURE__ */ React6.createElement(ChainTransactionNetwork, {
|
|
274
287
|
network,
|
|
275
288
|
onNetworkChange
|
|
276
|
-
}), network ? /* @__PURE__ */
|
|
289
|
+
}), network ? /* @__PURE__ */ React6.createElement(ChainTransactionBuilder, {
|
|
277
290
|
onSubmitTx
|
|
278
|
-
}) : null, result?.[2].length === 0 ? /* @__PURE__ */
|
|
291
|
+
}) : null, result?.[2].length === 0 ? /* @__PURE__ */ React6.createElement(Alert, {
|
|
279
292
|
severity: "success"
|
|
280
|
-
}, "Success") : null, error ? /* @__PURE__ */
|
|
293
|
+
}, "Success") : null, error ? /* @__PURE__ */ React6.createElement(ErrorRender, {
|
|
281
294
|
error
|
|
282
|
-
}) : null, result?.[2] && result?.[2].length > 0 ? /* @__PURE__ */
|
|
295
|
+
}) : null, result?.[2] && result?.[2].length > 0 ? /* @__PURE__ */ React6.createElement(ErrorRender, {
|
|
283
296
|
error: new Error("Failed insert...see result below")
|
|
284
|
-
}) : null, result ? /* @__PURE__ */
|
|
297
|
+
}) : null, result ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Typography, {
|
|
285
298
|
variant: "h6"
|
|
286
|
-
}, "Result:"), /* @__PURE__ */
|
|
299
|
+
}, "Result:"), /* @__PURE__ */ React6.createElement("pre", null, JSON.stringify(result, null, 2))) : null)));
|
|
287
300
|
}, "SubmitChainTransaction");
|
|
288
301
|
|
|
289
302
|
// src/components/transactions/TransactionCountChip.tsx
|
|
290
303
|
import CompareArrowsIcon from "@mui/icons-material/CompareArrows";
|
|
291
304
|
import { Chip, Icon } from "@mui/material";
|
|
292
|
-
import
|
|
305
|
+
import React7, { useMemo as useMemo3 } from "react";
|
|
293
306
|
var TransactionCountChip = /* @__PURE__ */ __name(({ transactions, sx, ...props }) => {
|
|
294
307
|
const label = useMemo3(() => {
|
|
295
308
|
if (!transactions) return "0";
|
|
@@ -297,8 +310,8 @@ var TransactionCountChip = /* @__PURE__ */ __name(({ transactions, sx, ...props
|
|
|
297
310
|
}, [
|
|
298
311
|
transactions
|
|
299
312
|
]);
|
|
300
|
-
return /* @__PURE__ */
|
|
301
|
-
avatar: /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ React7.createElement(Chip, {
|
|
314
|
+
avatar: /* @__PURE__ */ React7.createElement(Icon, null, /* @__PURE__ */ React7.createElement(CompareArrowsIcon, null)),
|
|
302
315
|
label,
|
|
303
316
|
title: transactions ? `Block contains ${transactions.length} transactions` : void 0,
|
|
304
317
|
sx: {
|
|
@@ -317,7 +330,7 @@ import { Alert as Alert2, AlertTitle, Collapse, Snackbar, Typography as Typograp
|
|
|
317
330
|
import { ErrorRender as ErrorRender2 } from "@xylabs/react-error";
|
|
318
331
|
import { FlexGrowCol as FlexGrowCol2, FlexGrowRow, FlexRow } from "@xylabs/react-flexbox";
|
|
319
332
|
import { QuickTipButton } from "@xylabs/react-quick-tip-button";
|
|
320
|
-
import
|
|
333
|
+
import React8, { Fragment, useMemo as useMemo4, useState as useState6 } from "react";
|
|
321
334
|
|
|
322
335
|
// src/hooks/chain-iterator/ChainIteratorStore.ts
|
|
323
336
|
import { assertEx } from "@xylabs/assert";
|
|
@@ -555,7 +568,7 @@ var TransactionsQuickTipButton = /* @__PURE__ */ __name(({ block, ...props }) =>
|
|
|
555
568
|
setCopied(false);
|
|
556
569
|
}, 5e3);
|
|
557
570
|
}, "onCopy");
|
|
558
|
-
return /* @__PURE__ */
|
|
571
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(QuickTipButton, {
|
|
559
572
|
Icon: Paid,
|
|
560
573
|
disabled: transactions?.length === 0,
|
|
561
574
|
hoverText: `Transaction Count: ${transactions?.length ?? 0}`,
|
|
@@ -565,32 +578,32 @@ var TransactionsQuickTipButton = /* @__PURE__ */ __name(({ block, ...props }) =>
|
|
|
565
578
|
maxWidth: "md"
|
|
566
579
|
},
|
|
567
580
|
...props
|
|
568
|
-
}, transactions?.length === 0 ? null : /* @__PURE__ */
|
|
581
|
+
}, transactions?.length === 0 ? null : /* @__PURE__ */ React8.createElement(FlexGrowCol2, {
|
|
569
582
|
gap: 1,
|
|
570
583
|
alignItems: "stretch"
|
|
571
|
-
}, transactions?.map(([transaction, hash]) => /* @__PURE__ */
|
|
584
|
+
}, transactions?.map(([transaction, hash]) => /* @__PURE__ */ React8.createElement(Fragment, {
|
|
572
585
|
key: hash
|
|
573
|
-
}, /* @__PURE__ */
|
|
586
|
+
}, /* @__PURE__ */ React8.createElement(FlexGrowRow, {
|
|
574
587
|
gap: 2,
|
|
575
588
|
justifyContent: "start"
|
|
576
|
-
}, /* @__PURE__ */
|
|
589
|
+
}, /* @__PURE__ */ React8.createElement(ContentCopyIcon, {
|
|
577
590
|
sx: {
|
|
578
591
|
cursor: "pointer"
|
|
579
592
|
},
|
|
580
593
|
onClick: /* @__PURE__ */ __name(() => void onCopy(hash), "onClick")
|
|
581
|
-
}), /* @__PURE__ */
|
|
594
|
+
}), /* @__PURE__ */ React8.createElement(Typography2, {
|
|
582
595
|
sx: {
|
|
583
596
|
overflow: "hidden",
|
|
584
597
|
textOverflow: "ellipsis",
|
|
585
598
|
whiteSpace: "nowrap"
|
|
586
599
|
}
|
|
587
|
-
}, hash)), /* @__PURE__ */
|
|
600
|
+
}, hash)), /* @__PURE__ */ React8.createElement(FlexRow, null, /* @__PURE__ */ React8.createElement(Collapse, {
|
|
588
601
|
in: copied,
|
|
589
602
|
unmountOnExit: true
|
|
590
|
-
}, /* @__PURE__ */
|
|
603
|
+
}, /* @__PURE__ */ React8.createElement(Alert2, null, /* @__PURE__ */ React8.createElement(AlertTitle, null, "Previous hash copied to clipboard")))))))), /* @__PURE__ */ React8.createElement(Snackbar, {
|
|
591
604
|
open: showError,
|
|
592
605
|
onClose: /* @__PURE__ */ __name(() => setShowError(false), "onClose")
|
|
593
|
-
}, /* @__PURE__ */
|
|
606
|
+
}, /* @__PURE__ */ React8.createElement(ErrorRender2, {
|
|
594
607
|
error: transactionsError,
|
|
595
608
|
scope: "TransactionsQuickTipButton"
|
|
596
609
|
})));
|
|
@@ -645,13 +658,13 @@ var blockProducer = /* @__PURE__ */ __name((block) => {
|
|
|
645
658
|
}, "blockProducer");
|
|
646
659
|
|
|
647
660
|
// src/components/block/helpers/buildBlockChainRenderComponent.tsx
|
|
648
|
-
import
|
|
661
|
+
import React9 from "react";
|
|
649
662
|
var buildBlockChainRenderComponent = /* @__PURE__ */ __name(async (BlockComponent, blockComponentProps) => {
|
|
650
663
|
const { block, ...remainingProps } = blockComponentProps;
|
|
651
664
|
const blockTxs = await txsFromBlock(block);
|
|
652
665
|
const txHashes = blockTxs.map(([_, hash]) => hash);
|
|
653
666
|
const item = {
|
|
654
|
-
child: /* @__PURE__ */
|
|
667
|
+
child: /* @__PURE__ */ React9.createElement(BlockComponent, {
|
|
655
668
|
block,
|
|
656
669
|
transactions: txHashes,
|
|
657
670
|
...remainingProps
|
|
@@ -757,9 +770,9 @@ var useStaticBlockComponents = /* @__PURE__ */ __name((BlockComponent, params, b
|
|
|
757
770
|
|
|
758
771
|
// src/components/block/LinkedDivider.tsx
|
|
759
772
|
import { Divider, Stack } from "@mui/material";
|
|
760
|
-
import
|
|
773
|
+
import React10 from "react";
|
|
761
774
|
var LinkedDivider = /* @__PURE__ */ __name(() => {
|
|
762
|
-
return /* @__PURE__ */
|
|
775
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Stack, {
|
|
763
776
|
className: "divider-spacer",
|
|
764
777
|
justifyContent: "end",
|
|
765
778
|
sx: {
|
|
@@ -767,7 +780,7 @@ var LinkedDivider = /* @__PURE__ */ __name(() => {
|
|
|
767
780
|
height: 24,
|
|
768
781
|
justifyContent: "end"
|
|
769
782
|
}
|
|
770
|
-
}, /* @__PURE__ */
|
|
783
|
+
}, /* @__PURE__ */ React10.createElement(Divider, {
|
|
771
784
|
className: "divider",
|
|
772
785
|
orientation: "vertical",
|
|
773
786
|
flexItem: true,
|
|
@@ -783,16 +796,16 @@ var LinkedDivider = /* @__PURE__ */ __name(() => {
|
|
|
783
796
|
import { MoreVert } from "@mui/icons-material";
|
|
784
797
|
import { IconButton, Menu } from "@mui/material";
|
|
785
798
|
import { BWJsonMenuItem, BWPreviousHashMenuItem } from "@xyo-network/react-boundwitness-plugin";
|
|
786
|
-
import
|
|
799
|
+
import React11 from "react";
|
|
787
800
|
var BlockMenuExpanded = /* @__PURE__ */ __name(({ block }) => {
|
|
788
801
|
const { anchorEl, anchorRef, open, handleClick, handleClose } = useAnchorElement();
|
|
789
|
-
return /* @__PURE__ */
|
|
802
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(IconButton, {
|
|
790
803
|
ref: anchorRef,
|
|
791
804
|
size: "small",
|
|
792
805
|
onClick: handleClick
|
|
793
|
-
}, /* @__PURE__ */
|
|
806
|
+
}, /* @__PURE__ */ React11.createElement(MoreVert, {
|
|
794
807
|
fontSize: "inherit"
|
|
795
|
-
})), /* @__PURE__ */
|
|
808
|
+
})), /* @__PURE__ */ React11.createElement(Menu, {
|
|
796
809
|
open,
|
|
797
810
|
anchorEl,
|
|
798
811
|
anchorOrigin: {
|
|
@@ -800,11 +813,11 @@ var BlockMenuExpanded = /* @__PURE__ */ __name(({ block }) => {
|
|
|
800
813
|
vertical: "bottom"
|
|
801
814
|
},
|
|
802
815
|
onClose: handleClose
|
|
803
|
-
}, /* @__PURE__ */
|
|
816
|
+
}, /* @__PURE__ */ React11.createElement(BWPreviousHashMenuItem, {
|
|
804
817
|
boundwitness: block?.[0],
|
|
805
818
|
dense: true,
|
|
806
819
|
onDialogClose: handleClose
|
|
807
|
-
}), /* @__PURE__ */
|
|
820
|
+
}), /* @__PURE__ */ React11.createElement(BWJsonMenuItem, {
|
|
808
821
|
boundwitness: block?.[0],
|
|
809
822
|
dense: true,
|
|
810
823
|
onDialogClose: handleClose
|
|
@@ -817,13 +830,13 @@ import { EthAddressWrapper } from "@xylabs/eth-address";
|
|
|
817
830
|
import { toAddress } from "@xylabs/hex";
|
|
818
831
|
import { isString, isUndefined as isUndefined2 } from "@xylabs/typeof";
|
|
819
832
|
import { BlockiesAvatar } from "@xyo-network/react-chain-blockies";
|
|
820
|
-
import
|
|
833
|
+
import React13, { useMemo as useMemo7 } from "react";
|
|
821
834
|
|
|
822
835
|
// src/components/block/ChipSkeleton.tsx
|
|
823
836
|
import { Skeleton } from "@mui/material";
|
|
824
|
-
import
|
|
837
|
+
import React12 from "react";
|
|
825
838
|
var ChipSkeleton = /* @__PURE__ */ __name((props) => {
|
|
826
|
-
return /* @__PURE__ */
|
|
839
|
+
return /* @__PURE__ */ React12.createElement(Skeleton, {
|
|
827
840
|
width: 100,
|
|
828
841
|
...props
|
|
829
842
|
});
|
|
@@ -837,7 +850,7 @@ var formatProducerAddress = /* @__PURE__ */ __name((address) => {
|
|
|
837
850
|
}, "formatProducerAddress");
|
|
838
851
|
var BlockProducerChip = /* @__PURE__ */ __name(({ block, ...props }) => {
|
|
839
852
|
const blockProducer2 = block?.[0].addresses[0];
|
|
840
|
-
return /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ React13.createElement(BlockAddressChip, {
|
|
841
854
|
address: blockProducer2,
|
|
842
855
|
toolTipTitle: `Block producer: ${blockProducer2}`,
|
|
843
856
|
...props
|
|
@@ -845,16 +858,16 @@ var BlockProducerChip = /* @__PURE__ */ __name(({ block, ...props }) => {
|
|
|
845
858
|
}, "BlockProducerChip");
|
|
846
859
|
var BlockAddressChip = /* @__PURE__ */ __name(({ address, sx, toolTipTitle, ...props }) => {
|
|
847
860
|
const shortedBlockProducer = address === void 0 ? null : formatProducerAddress(address);
|
|
848
|
-
const avatar = useMemo7(() => address === "" ? void 0 : /* @__PURE__ */
|
|
861
|
+
const avatar = useMemo7(() => address === "" ? void 0 : /* @__PURE__ */ React13.createElement(BlockiesAvatar, {
|
|
849
862
|
blockiesOptions: {
|
|
850
863
|
seed: address
|
|
851
864
|
}
|
|
852
865
|
}), [
|
|
853
866
|
address
|
|
854
867
|
]);
|
|
855
|
-
return /* @__PURE__ */
|
|
868
|
+
return /* @__PURE__ */ React13.createElement(Chip2, {
|
|
856
869
|
avatar,
|
|
857
|
-
label: shortedBlockProducer ?? /* @__PURE__ */
|
|
870
|
+
label: shortedBlockProducer ?? /* @__PURE__ */ React13.createElement(ChipSkeleton, {
|
|
858
871
|
width: 115
|
|
859
872
|
}),
|
|
860
873
|
title: toolTipTitle,
|
|
@@ -877,12 +890,12 @@ var BlockHeadingFlexbox = /* @__PURE__ */ __name(({ block, defaultExpanded, tran
|
|
|
877
890
|
event.stopPropagation();
|
|
878
891
|
blockHeadingListener("transaction-count", "click", JSON.stringify(transactions2));
|
|
879
892
|
}, "handleTransactionCountClick");
|
|
880
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ React14.createElement(FlexCol2, {
|
|
881
894
|
className: "block-heading-flexbox",
|
|
882
895
|
alignItems: "stretch",
|
|
883
896
|
ref: blockHeadingRef,
|
|
884
897
|
onClick: /* @__PURE__ */ __name(() => blockHeadingListener("block-hash", "click", hash), "onClick")
|
|
885
|
-
}, /* @__PURE__ */
|
|
898
|
+
}, /* @__PURE__ */ React14.createElement(LinkedDivider, null), /* @__PURE__ */ React14.createElement(HashHeadingPaper, {
|
|
886
899
|
hash,
|
|
887
900
|
heading: block?.[0].block === void 0 ? "" : block?.[0].block.toString(),
|
|
888
901
|
paperProps: {
|
|
@@ -891,24 +904,24 @@ var BlockHeadingFlexbox = /* @__PURE__ */ __name(({ block, defaultExpanded, tran
|
|
|
891
904
|
width: "100%"
|
|
892
905
|
}
|
|
893
906
|
},
|
|
894
|
-
AdornmentEnd: /* @__PURE__ */
|
|
907
|
+
AdornmentEnd: /* @__PURE__ */ React14.createElement(FlexRow2, {
|
|
895
908
|
gap: 1
|
|
896
|
-
}, /* @__PURE__ */
|
|
909
|
+
}, /* @__PURE__ */ React14.createElement(BlockProducerChip, {
|
|
897
910
|
block
|
|
898
|
-
}), /* @__PURE__ */
|
|
911
|
+
}), /* @__PURE__ */ React14.createElement(TransactionCountChip, {
|
|
899
912
|
onClick: /* @__PURE__ */ __name((e) => handleTransactionCountClick(e, transactions ?? []), "onClick"),
|
|
900
913
|
transactions
|
|
901
|
-
}), /* @__PURE__ */
|
|
914
|
+
}), /* @__PURE__ */ React14.createElement(BWVerification, {
|
|
902
915
|
iconColors: true,
|
|
903
916
|
boundwitness: block?.[0]
|
|
904
|
-
}), /* @__PURE__ */
|
|
917
|
+
}), /* @__PURE__ */ React14.createElement("span", {
|
|
905
918
|
style: {
|
|
906
919
|
// maxWidth is required for css animation to work and 28px is the width of the icon button
|
|
907
920
|
display: "flex",
|
|
908
921
|
transition: "max-width .5s",
|
|
909
922
|
maxWidth: expanded ? "28px" : 0
|
|
910
923
|
}
|
|
911
|
-
}, /* @__PURE__ */
|
|
924
|
+
}, /* @__PURE__ */ React14.createElement(BlockMenuExpanded, {
|
|
912
925
|
block
|
|
913
926
|
}))),
|
|
914
927
|
identiconProps: {
|
|
@@ -919,29 +932,40 @@ var BlockHeadingFlexbox = /* @__PURE__ */ __name(({ block, defaultExpanded, tran
|
|
|
919
932
|
}, "BlockHeadingFlexbox");
|
|
920
933
|
|
|
921
934
|
// src/components/block/table/cell/BlockNumber.tsx
|
|
922
|
-
import { TableCell, Tooltip, Typography as Typography3 } from "@mui/material";
|
|
923
|
-
import
|
|
935
|
+
import { Link, TableCell, Tooltip, Typography as Typography3 } from "@mui/material";
|
|
936
|
+
import { useEvent as useEvent2 } from "@xyo-network/react-event";
|
|
937
|
+
import React15 from "react";
|
|
924
938
|
var BlockNumberTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
|
|
925
939
|
const blockNumber = block?.[0].block;
|
|
926
|
-
return /* @__PURE__ */
|
|
940
|
+
return /* @__PURE__ */ React15.createElement(BlockNumberTableCellInner, {
|
|
927
941
|
blockNumber,
|
|
928
942
|
linked,
|
|
929
943
|
...props
|
|
930
944
|
});
|
|
931
945
|
}, "BlockNumberTableCell");
|
|
932
946
|
var BlockNumberTableCellInner = /* @__PURE__ */ __name(({ blockNumber, linked, ...props }) => {
|
|
933
|
-
|
|
947
|
+
const [ref, dispatch] = useEvent2();
|
|
948
|
+
const handleClick = /* @__PURE__ */ __name(() => dispatch("block-number", "click", blockNumber?.toString() ?? ""), "handleClick");
|
|
949
|
+
return /* @__PURE__ */ React15.createElement(TableCell, {
|
|
950
|
+
ref,
|
|
951
|
+
...props
|
|
952
|
+
}, /* @__PURE__ */ React15.createElement(Tooltip, {
|
|
934
953
|
title: `Block Number: ${blockNumber}`
|
|
935
|
-
}, /* @__PURE__ */
|
|
954
|
+
}, /* @__PURE__ */ React15.createElement(Typography3, {
|
|
936
955
|
component: "span",
|
|
937
956
|
variant: "body1"
|
|
938
|
-
},
|
|
957
|
+
}, linked ? /* @__PURE__ */ React15.createElement(Link, {
|
|
958
|
+
onClick: handleClick,
|
|
959
|
+
sx: {
|
|
960
|
+
cursor: "pointer"
|
|
961
|
+
}
|
|
962
|
+
}, blockNumber) : blockNumber)));
|
|
939
963
|
}, "BlockNumberTableCellInner");
|
|
940
964
|
|
|
941
965
|
// src/components/block/table/cell/Epoch.tsx
|
|
942
966
|
import { Skeleton as Skeleton2, TableCell as TableCell2, Tooltip as Tooltip2, Typography as Typography4 } from "@mui/material";
|
|
943
967
|
import { isDefined as isDefined3 } from "@xylabs/typeof";
|
|
944
|
-
import
|
|
968
|
+
import React16 from "react";
|
|
945
969
|
|
|
946
970
|
// src/components/block/table/cell/lib/timeFunctions.ts
|
|
947
971
|
var dateFormat = Intl.DateTimeFormat(globalThis.navigator.language ?? "en-US", {
|
|
@@ -1007,45 +1031,45 @@ var BlockEpochTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) =
|
|
|
1007
1031
|
const epoch = block?.[0]?.$epoch;
|
|
1008
1032
|
const dateTime = dateFormat.format(epoch);
|
|
1009
1033
|
const age = isDefined3(epoch) ? timeAgo(epoch) : void 0;
|
|
1010
|
-
return /* @__PURE__ */
|
|
1034
|
+
return /* @__PURE__ */ React16.createElement(TableCell2, props, /* @__PURE__ */ React16.createElement(Tooltip2, {
|
|
1011
1035
|
title: `Block Epoch: ${dateTime}`
|
|
1012
|
-
}, /* @__PURE__ */
|
|
1036
|
+
}, /* @__PURE__ */ React16.createElement(Typography4, {
|
|
1013
1037
|
component: "span",
|
|
1014
1038
|
variant: "body1"
|
|
1015
|
-
}, age ?? /* @__PURE__ */
|
|
1039
|
+
}, age ?? /* @__PURE__ */ React16.createElement(Skeleton2, {
|
|
1016
1040
|
width: 115
|
|
1017
1041
|
}))));
|
|
1018
1042
|
}, "BlockEpochTableCell");
|
|
1019
1043
|
var BlockEpochTableCellInner = /* @__PURE__ */ __name(({ epoch, linked, ...props }) => {
|
|
1020
1044
|
const dateTime = dateFormat.format(epoch);
|
|
1021
1045
|
const age = isDefined3(epoch) ? timeAgo(epoch) : void 0;
|
|
1022
|
-
return /* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ React16.createElement(TableCell2, props, /* @__PURE__ */ React16.createElement(Tooltip2, {
|
|
1023
1047
|
title: `Block Epoch: ${dateTime}`
|
|
1024
|
-
}, /* @__PURE__ */
|
|
1048
|
+
}, /* @__PURE__ */ React16.createElement(Typography4, {
|
|
1025
1049
|
component: "span",
|
|
1026
1050
|
variant: "body1"
|
|
1027
|
-
}, age ?? /* @__PURE__ */
|
|
1051
|
+
}, age ?? /* @__PURE__ */ React16.createElement(Skeleton2, {
|
|
1028
1052
|
width: 115
|
|
1029
1053
|
}))));
|
|
1030
1054
|
}, "BlockEpochTableCellInner");
|
|
1031
1055
|
|
|
1032
1056
|
// src/components/block/table/cell/Hash.tsx
|
|
1033
|
-
import { Link, TableCell as TableCell3, Tooltip as Tooltip3 } from "@mui/material";
|
|
1057
|
+
import { Link as Link2, TableCell as TableCell3, Tooltip as Tooltip3 } from "@mui/material";
|
|
1034
1058
|
import { isHash as isHash2 } from "@xylabs/hex";
|
|
1035
1059
|
import { usePayloadRootHash } from "@xyo-network/react-shared";
|
|
1036
|
-
import
|
|
1060
|
+
import React18, { useState as useState9 } from "react";
|
|
1037
1061
|
|
|
1038
1062
|
// src/components/FeatureNotAvailable.tsx
|
|
1039
1063
|
import { Button as Button2, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
|
|
1040
|
-
import
|
|
1041
|
-
var FeatureNotAvailable = /* @__PURE__ */ __name(({ featureName = "Feature", ...props }) => /* @__PURE__ */
|
|
1064
|
+
import React17 from "react";
|
|
1065
|
+
var FeatureNotAvailable = /* @__PURE__ */ __name(({ featureName = "Feature", ...props }) => /* @__PURE__ */ React17.createElement(Dialog, props, /* @__PURE__ */ React17.createElement(DialogTitle, null, `${featureName} Not Available`), /* @__PURE__ */ React17.createElement(DialogContent, null, "This feature is not currently available. Either you do not have access to it or it is currently undergoing maintenance."), /* @__PURE__ */ React17.createElement(DialogActions, null, /* @__PURE__ */ React17.createElement(Button2, {
|
|
1042
1066
|
onClick: /* @__PURE__ */ __name((e) => props.onClose?.(e, "backdropClick"), "onClick")
|
|
1043
1067
|
}, "Close"))), "FeatureNotAvailable");
|
|
1044
1068
|
|
|
1045
1069
|
// src/components/block/table/cell/hooks/useLinkedBlockItem.tsx
|
|
1046
|
-
import { useEvent as
|
|
1070
|
+
import { useEvent as useEvent3 } from "@xyo-network/react-event";
|
|
1047
1071
|
var useLinkedBlockItem = /* @__PURE__ */ __name((noun, data) => {
|
|
1048
|
-
const [ref, dispatch] =
|
|
1072
|
+
const [ref, dispatch] = useEvent3();
|
|
1049
1073
|
const handleClick = /* @__PURE__ */ __name((event) => {
|
|
1050
1074
|
event.preventDefault();
|
|
1051
1075
|
event.stopPropagation();
|
|
@@ -1071,17 +1095,17 @@ var BlockHashTableCell = /* @__PURE__ */ __name(({ block, notAvailableDialog, li
|
|
|
1071
1095
|
const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
|
|
1072
1096
|
const [notAvailable, setNotAvailable] = useState9(false);
|
|
1073
1097
|
const shortenedHash = isHash2(hash) ? `${hash.slice(0, 4)}...${hash.slice(-5, -1)}` : void 0;
|
|
1074
|
-
return /* @__PURE__ */
|
|
1098
|
+
return /* @__PURE__ */ React18.createElement(TableCell3, {
|
|
1075
1099
|
ref,
|
|
1076
1100
|
...props
|
|
1077
|
-
}, /* @__PURE__ */
|
|
1101
|
+
}, /* @__PURE__ */ React18.createElement(Tooltip3, {
|
|
1078
1102
|
title: `Block Hash: ${hash}`
|
|
1079
|
-
}, linked ? /* @__PURE__ */
|
|
1103
|
+
}, linked ? /* @__PURE__ */ React18.createElement(Link2, {
|
|
1080
1104
|
sx: {
|
|
1081
1105
|
cursor: "pointer"
|
|
1082
1106
|
},
|
|
1083
1107
|
onClick: linked ? handleClick : () => setNotAvailable(true)
|
|
1084
|
-
}, shortenedHash ?? /* @__PURE__ */
|
|
1108
|
+
}, shortenedHash ?? /* @__PURE__ */ React18.createElement(ChipSkeleton, null)) : /* @__PURE__ */ React18.createElement("span", null, shortenedHash ?? /* @__PURE__ */ React18.createElement(ChipSkeleton, null))), notAvailableDialog && notAvailable ? /* @__PURE__ */ React18.createElement(FeatureNotAvailable, {
|
|
1085
1109
|
featureName: "Block Details",
|
|
1086
1110
|
open: notAvailable,
|
|
1087
1111
|
onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
|
|
@@ -1096,31 +1120,31 @@ import { isHash as isHash3 } from "@xylabs/hex";
|
|
|
1096
1120
|
import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
|
|
1097
1121
|
import { JsonViewerEx } from "@xyo-network/react-payload-raw-info";
|
|
1098
1122
|
import { usePayloadRootHash as usePayloadRootHash2 } from "@xyo-network/react-shared";
|
|
1099
|
-
import
|
|
1123
|
+
import React19, { useState as useState10 } from "react";
|
|
1100
1124
|
var BlockJsonViewTableCell = /* @__PURE__ */ __name(({ block, ...props }) => {
|
|
1101
1125
|
const [open, setOpen] = useState10(false);
|
|
1102
1126
|
const onClose = /* @__PURE__ */ __name(() => setOpen(false), "onClose");
|
|
1103
1127
|
const hash = usePayloadRootHash2(block?.[0]);
|
|
1104
1128
|
const title = isHash3(hash) ? `JSON for ${ellipsize(hash, 5)}` : "JSON";
|
|
1105
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ React19.createElement(TableCell4, props, /* @__PURE__ */ React19.createElement(FlexRow3, {
|
|
1106
1130
|
onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
|
|
1107
1131
|
sx: {
|
|
1108
1132
|
width: "100%"
|
|
1109
1133
|
}
|
|
1110
|
-
}, /* @__PURE__ */
|
|
1134
|
+
}, /* @__PURE__ */ React19.createElement(IconButton2, {
|
|
1111
1135
|
onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
|
|
1112
|
-
}, /* @__PURE__ */
|
|
1136
|
+
}, /* @__PURE__ */ React19.createElement(DataObject, null)), /* @__PURE__ */ React19.createElement(Dialog2, {
|
|
1113
1137
|
open,
|
|
1114
1138
|
onClose
|
|
1115
|
-
}, /* @__PURE__ */
|
|
1139
|
+
}, /* @__PURE__ */ React19.createElement(DialogTitle2, null, title), /* @__PURE__ */ React19.createElement(DialogContent2, null, /* @__PURE__ */ React19.createElement(JsonViewerEx, {
|
|
1116
1140
|
value: block
|
|
1117
|
-
})), /* @__PURE__ */
|
|
1141
|
+
})), /* @__PURE__ */ React19.createElement(DialogActions2, {
|
|
1118
1142
|
sx: {
|
|
1119
1143
|
display: "flex",
|
|
1120
1144
|
flexDirection: "row",
|
|
1121
1145
|
justifyContent: "end"
|
|
1122
1146
|
}
|
|
1123
|
-
}, /* @__PURE__ */
|
|
1147
|
+
}, /* @__PURE__ */ React19.createElement(Button3, {
|
|
1124
1148
|
variant: "contained",
|
|
1125
1149
|
onClick: onClose
|
|
1126
1150
|
}, "Close")))));
|
|
@@ -1128,8 +1152,8 @@ var BlockJsonViewTableCell = /* @__PURE__ */ __name(({ block, ...props }) => {
|
|
|
1128
1152
|
|
|
1129
1153
|
// src/components/block/table/cell/PayloadCounts.tsx
|
|
1130
1154
|
import { Error as Error2 } from "@mui/icons-material";
|
|
1131
|
-
import { Link as
|
|
1132
|
-
import
|
|
1155
|
+
import { Link as Link3, TableCell as TableCell5, Tooltip as Tooltip4 } from "@mui/material";
|
|
1156
|
+
import React20 from "react";
|
|
1133
1157
|
var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
|
|
1134
1158
|
const [publicPayloads, privatePayloads, error] = usePayloadCountsFromBlock(block);
|
|
1135
1159
|
const data = block && privatePayloads !== void 0 && publicPayloads !== void 0 ? {
|
|
@@ -1139,32 +1163,32 @@ var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...pr
|
|
|
1139
1163
|
} : void 0;
|
|
1140
1164
|
const payloadCount = (publicPayloads ?? 0) + (privatePayloads ?? 0);
|
|
1141
1165
|
const [ref, handleClick] = useLinkedBlockItem("payload-counts", data);
|
|
1142
|
-
return /* @__PURE__ */
|
|
1166
|
+
return /* @__PURE__ */ React20.createElement(TableCell5, {
|
|
1143
1167
|
ref,
|
|
1144
1168
|
...props
|
|
1145
|
-
}, /* @__PURE__ */
|
|
1169
|
+
}, /* @__PURE__ */ React20.createElement("span", null, error ? /* @__PURE__ */ React20.createElement(Tooltip4, {
|
|
1146
1170
|
title: error.message
|
|
1147
|
-
}, /* @__PURE__ */
|
|
1171
|
+
}, /* @__PURE__ */ React20.createElement(Error2, {
|
|
1148
1172
|
color: "error"
|
|
1149
|
-
})) : null, linked ? /* @__PURE__ */
|
|
1173
|
+
})) : null, linked ? /* @__PURE__ */ React20.createElement(Tooltip4, {
|
|
1150
1174
|
title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
|
|
1151
|
-
}, /* @__PURE__ */
|
|
1175
|
+
}, /* @__PURE__ */ React20.createElement(Link3, {
|
|
1152
1176
|
onClick: handleClick,
|
|
1153
1177
|
sx: {
|
|
1154
1178
|
cursor: "pointer"
|
|
1155
1179
|
}
|
|
1156
|
-
}, payloadCount)) : /* @__PURE__ */
|
|
1180
|
+
}, payloadCount)) : /* @__PURE__ */ React20.createElement(Tooltip4, {
|
|
1157
1181
|
title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
|
|
1158
|
-
}, /* @__PURE__ */
|
|
1182
|
+
}, /* @__PURE__ */ React20.createElement("span", null, payloadCount))));
|
|
1159
1183
|
}, "BlockPayloadCountsTableCell");
|
|
1160
1184
|
|
|
1161
1185
|
// src/components/block/table/cell/Producer.tsx
|
|
1162
1186
|
import { TableCell as TableCell6, Tooltip as Tooltip5 } from "@mui/material";
|
|
1163
|
-
import
|
|
1187
|
+
import React21, { useState as useState11 } from "react";
|
|
1164
1188
|
var BlockProducerTableCell = /* @__PURE__ */ __name(({ block, linked, notAvailableDialog, producerChipProps, ...props }) => {
|
|
1165
1189
|
const [ref, handleClick] = useLinkedBlockItem("block-producer", JSON.stringify(block));
|
|
1166
1190
|
const producer = useBlockProducer(block);
|
|
1167
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ React21.createElement(BlockProducerTableCellInner, {
|
|
1168
1192
|
address: producer,
|
|
1169
1193
|
handleClick,
|
|
1170
1194
|
linked,
|
|
@@ -1176,9 +1200,9 @@ var BlockProducerTableCell = /* @__PURE__ */ __name(({ block, linked, notAvailab
|
|
|
1176
1200
|
}, "BlockProducerTableCell");
|
|
1177
1201
|
var BlockProducerTableCellInner = /* @__PURE__ */ __name(({ address, handleClick, linked, notAvailableDialog, producerChipProps, ...props }) => {
|
|
1178
1202
|
const [notAvailable, setNotAvailable] = useState11(false);
|
|
1179
|
-
return /* @__PURE__ */
|
|
1203
|
+
return /* @__PURE__ */ React21.createElement(TableCell6, props, /* @__PURE__ */ React21.createElement(Tooltip5, {
|
|
1180
1204
|
title: `Block Producer: ${address}`
|
|
1181
|
-
}, /* @__PURE__ */
|
|
1205
|
+
}, /* @__PURE__ */ React21.createElement(BlockAddressChip, {
|
|
1182
1206
|
sx: {
|
|
1183
1207
|
cursor: "pointer"
|
|
1184
1208
|
},
|
|
@@ -1186,7 +1210,7 @@ var BlockProducerTableCellInner = /* @__PURE__ */ __name(({ address, handleClick
|
|
|
1186
1210
|
address,
|
|
1187
1211
|
toolTipTitle: `Block Producer: ${address}`,
|
|
1188
1212
|
...producerChipProps
|
|
1189
|
-
})), notAvailableDialog && notAvailable ? /* @__PURE__ */
|
|
1213
|
+
})), notAvailableDialog && notAvailable ? /* @__PURE__ */ React21.createElement(FeatureNotAvailable, {
|
|
1190
1214
|
featureName: "Producer Details",
|
|
1191
1215
|
open: notAvailable,
|
|
1192
1216
|
onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
|
|
@@ -1195,8 +1219,8 @@ var BlockProducerTableCellInner = /* @__PURE__ */ __name(({ address, handleClick
|
|
|
1195
1219
|
|
|
1196
1220
|
// src/components/block/table/cell/TransactionCount.tsx
|
|
1197
1221
|
import { Error as Error3 } from "@mui/icons-material";
|
|
1198
|
-
import { Link as
|
|
1199
|
-
import
|
|
1222
|
+
import { Link as Link4, TableCell as TableCell7, Tooltip as Tooltip6 } from "@mui/material";
|
|
1223
|
+
import React22, { useMemo as useMemo8 } from "react";
|
|
1200
1224
|
var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
|
|
1201
1225
|
const [transactions, error] = useTxsFromBlock(block);
|
|
1202
1226
|
const txHashes = useMemo8(() => transactions?.map(([, hash]) => hash), [
|
|
@@ -1207,14 +1231,14 @@ var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, linked, ..
|
|
|
1207
1231
|
block: block[0]._hash
|
|
1208
1232
|
} : void 0;
|
|
1209
1233
|
const [ref, handleClick] = useLinkedBlockItem("transaction-count", data);
|
|
1210
|
-
return /* @__PURE__ */
|
|
1234
|
+
return /* @__PURE__ */ React22.createElement(TableCell7, {
|
|
1211
1235
|
ref,
|
|
1212
1236
|
...props
|
|
1213
|
-
}, /* @__PURE__ */
|
|
1237
|
+
}, /* @__PURE__ */ React22.createElement("span", null, error ? /* @__PURE__ */ React22.createElement(Tooltip6, {
|
|
1214
1238
|
title: error.message
|
|
1215
|
-
}, /* @__PURE__ */
|
|
1239
|
+
}, /* @__PURE__ */ React22.createElement(Error3, {
|
|
1216
1240
|
color: "error"
|
|
1217
|
-
})) : null, linked ? /* @__PURE__ */
|
|
1241
|
+
})) : null, linked ? /* @__PURE__ */ React22.createElement(Link4, {
|
|
1218
1242
|
onClick: handleClick,
|
|
1219
1243
|
sx: {
|
|
1220
1244
|
cursor: "pointer"
|
|
@@ -1227,17 +1251,17 @@ import { CheckCircleOutlineRounded } from "@mui/icons-material";
|
|
|
1227
1251
|
import { TableCell as TableCell8 } from "@mui/material";
|
|
1228
1252
|
import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
|
|
1229
1253
|
import { BWVerification as BWVerification2 } from "@xyo-network/react-boundwitness-plugin";
|
|
1230
|
-
import
|
|
1254
|
+
import React23 from "react";
|
|
1231
1255
|
var BlockVerificationTableCell = /* @__PURE__ */ __name(({ block, linked, deepValidation, ...props }) => {
|
|
1232
|
-
return /* @__PURE__ */
|
|
1256
|
+
return /* @__PURE__ */ React23.createElement(TableCell8, props, /* @__PURE__ */ React23.createElement(FlexRow4, {
|
|
1233
1257
|
onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
|
|
1234
1258
|
sx: {
|
|
1235
1259
|
width: "100%"
|
|
1236
1260
|
}
|
|
1237
|
-
}, deepValidation ? /* @__PURE__ */
|
|
1261
|
+
}, deepValidation ? /* @__PURE__ */ React23.createElement(BWVerification2, {
|
|
1238
1262
|
iconColors: true,
|
|
1239
1263
|
boundwitness: block?.[0]
|
|
1240
|
-
}) : /* @__PURE__ */
|
|
1264
|
+
}) : /* @__PURE__ */ React23.createElement(CheckCircleOutlineRounded, {
|
|
1241
1265
|
color: "success"
|
|
1242
1266
|
})));
|
|
1243
1267
|
}, "BlockVerificationTableCell");
|
|
@@ -1245,57 +1269,57 @@ var BlockVerificationTableCell = /* @__PURE__ */ __name(({ block, linked, deepVa
|
|
|
1245
1269
|
// src/components/block/table/Ex.tsx
|
|
1246
1270
|
import { TableBody } from "@mui/material";
|
|
1247
1271
|
import { TableEx } from "@xyo-network/react-table";
|
|
1248
|
-
import
|
|
1272
|
+
import React25 from "react";
|
|
1249
1273
|
|
|
1250
1274
|
// src/components/block/table/head/TableHead.tsx
|
|
1251
1275
|
import { InfoOutline } from "@mui/icons-material";
|
|
1252
1276
|
import { TableCell as TableCell9, TableHead, TableRow, Tooltip as Tooltip7, Typography as Typography5 } from "@mui/material";
|
|
1253
1277
|
import { FlexRow as FlexRow5 } from "@xylabs/react-flexbox";
|
|
1254
|
-
import
|
|
1278
|
+
import React24 from "react";
|
|
1255
1279
|
var ToolTipTableCell = /* @__PURE__ */ __name(({ children, align, title, ...props }) => {
|
|
1256
|
-
return /* @__PURE__ */
|
|
1280
|
+
return /* @__PURE__ */ React24.createElement(TableCell9, {
|
|
1257
1281
|
title,
|
|
1258
1282
|
...props
|
|
1259
|
-
}, /* @__PURE__ */
|
|
1283
|
+
}, /* @__PURE__ */ React24.createElement(FlexRow5, {
|
|
1260
1284
|
justifyContent: align
|
|
1261
|
-
}, /* @__PURE__ */
|
|
1285
|
+
}, /* @__PURE__ */ React24.createElement(Typography5, {
|
|
1262
1286
|
variant: "body2"
|
|
1263
|
-
}, children), "\xA0", /* @__PURE__ */
|
|
1287
|
+
}, children), "\xA0", /* @__PURE__ */ React24.createElement(Tooltip7, {
|
|
1264
1288
|
title
|
|
1265
|
-
}, /* @__PURE__ */
|
|
1289
|
+
}, /* @__PURE__ */ React24.createElement(InfoOutline, {
|
|
1266
1290
|
fontSize: "small"
|
|
1267
1291
|
}))));
|
|
1268
1292
|
}, "ToolTipTableCell");
|
|
1269
1293
|
var BlockchainTableHead = /* @__PURE__ */ __name(() => {
|
|
1270
|
-
return /* @__PURE__ */
|
|
1294
|
+
return /* @__PURE__ */ React24.createElement(TableHead, null, /* @__PURE__ */ React24.createElement(TableRow, null, /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1271
1295
|
align: "left",
|
|
1272
1296
|
title: "The block number that is included in the block"
|
|
1273
|
-
}, "Block"), /* @__PURE__ */
|
|
1297
|
+
}, "Block"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1274
1298
|
title: "The hash of the block",
|
|
1275
1299
|
sx: {
|
|
1276
1300
|
width: "20%"
|
|
1277
1301
|
}
|
|
1278
|
-
}, "Hash"), /* @__PURE__ */
|
|
1302
|
+
}, "Hash"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1279
1303
|
title: "The epoch of the block",
|
|
1280
1304
|
sx: {
|
|
1281
1305
|
width: "20%"
|
|
1282
1306
|
}
|
|
1283
|
-
}, "Epoch"), /* @__PURE__ */
|
|
1307
|
+
}, "Epoch"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1284
1308
|
align: "left",
|
|
1285
1309
|
title: "The address of the block producer that produced the block",
|
|
1286
1310
|
sx: {
|
|
1287
1311
|
width: "20%"
|
|
1288
1312
|
}
|
|
1289
|
-
}, "Block Producer"), /* @__PURE__ */
|
|
1313
|
+
}, "Block Producer"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1290
1314
|
align: "left",
|
|
1291
1315
|
title: "Count of transactions that are included in the block"
|
|
1292
|
-
}, "Transactions"), /* @__PURE__ */
|
|
1316
|
+
}, "Transactions"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1293
1317
|
align: "left",
|
|
1294
1318
|
title: "Count of public and private payload counts for the block"
|
|
1295
|
-
}, "Payloads"), /* @__PURE__ */
|
|
1319
|
+
}, "Payloads"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1296
1320
|
align: "center",
|
|
1297
1321
|
title: "The result of the local validation check for the block"
|
|
1298
|
-
}, "Valid"), /* @__PURE__ */
|
|
1322
|
+
}, "Valid"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
|
|
1299
1323
|
align: "center",
|
|
1300
1324
|
title: "Link to display the raw JSON of the block"
|
|
1301
1325
|
}, "JSON")));
|
|
@@ -1303,10 +1327,10 @@ var BlockchainTableHead = /* @__PURE__ */ __name(() => {
|
|
|
1303
1327
|
|
|
1304
1328
|
// src/components/block/table/Ex.tsx
|
|
1305
1329
|
var BlockchainTableEx = /* @__PURE__ */ __name(({ ref, children, ...props }) => {
|
|
1306
|
-
return /* @__PURE__ */
|
|
1330
|
+
return /* @__PURE__ */ React25.createElement(TableEx, {
|
|
1307
1331
|
ref,
|
|
1308
1332
|
...props
|
|
1309
|
-
}, /* @__PURE__ */
|
|
1333
|
+
}, /* @__PURE__ */ React25.createElement(BlockchainTableHead, null), /* @__PURE__ */ React25.createElement(TableBody, null, children));
|
|
1310
1334
|
}, "BlockchainTableEx");
|
|
1311
1335
|
BlockchainTableEx.displayName = "BlockchainTableEx";
|
|
1312
1336
|
|
|
@@ -1314,7 +1338,7 @@ BlockchainTableEx.displayName = "BlockchainTableEx";
|
|
|
1314
1338
|
import { TableRow as TableRow2, useTheme } from "@mui/material";
|
|
1315
1339
|
import { alphaCss } from "@xylabs/react-theme";
|
|
1316
1340
|
import { usePayloadRootHash as usePayloadRootHash3 } from "@xyo-network/react-shared";
|
|
1317
|
-
import
|
|
1341
|
+
import React26, { useMemo as useMemo9 } from "react";
|
|
1318
1342
|
var BlockChainTableRow = /* @__PURE__ */ __name(({ block, deepValidation, defaultExpanded, linked, sx, ...props }) => {
|
|
1319
1343
|
const linkedTableCellProps = useMemo9(() => ({
|
|
1320
1344
|
block,
|
|
@@ -1331,7 +1355,7 @@ var BlockChainTableRow = /* @__PURE__ */ __name(({ block, deepValidation, defaul
|
|
|
1331
1355
|
const hash = usePayloadRootHash3(block?.[0]);
|
|
1332
1356
|
const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
|
|
1333
1357
|
const theme = useTheme();
|
|
1334
|
-
return /* @__PURE__ */
|
|
1358
|
+
return /* @__PURE__ */ React26.createElement(TableRow2, {
|
|
1335
1359
|
onClick: linked ? handleClick : void 0,
|
|
1336
1360
|
ref,
|
|
1337
1361
|
sx: {
|
|
@@ -1343,57 +1367,215 @@ var BlockChainTableRow = /* @__PURE__ */ __name(({ block, deepValidation, defaul
|
|
|
1343
1367
|
...sx
|
|
1344
1368
|
},
|
|
1345
1369
|
...props
|
|
1346
|
-
}, /* @__PURE__ */
|
|
1370
|
+
}, /* @__PURE__ */ React26.createElement(BlockNumberTableCell, {
|
|
1347
1371
|
align: "left",
|
|
1348
1372
|
...linkedTableCellProps
|
|
1349
|
-
}), /* @__PURE__ */
|
|
1373
|
+
}), /* @__PURE__ */ React26.createElement(BlockHashTableCell, {
|
|
1350
1374
|
align: "left",
|
|
1351
1375
|
...linkedTableCellProps
|
|
1352
|
-
}), /* @__PURE__ */
|
|
1376
|
+
}), /* @__PURE__ */ React26.createElement(BlockEpochTableCell, {
|
|
1353
1377
|
align: "left",
|
|
1354
1378
|
...linkedTableCellProps
|
|
1355
|
-
}), /* @__PURE__ */
|
|
1379
|
+
}), /* @__PURE__ */ React26.createElement(BlockProducerTableCell, {
|
|
1356
1380
|
align: "left",
|
|
1357
1381
|
...linkedTableCellProps
|
|
1358
|
-
}), /* @__PURE__ */
|
|
1382
|
+
}), /* @__PURE__ */ React26.createElement(BlockTransactionCountTableCell, {
|
|
1359
1383
|
align: "left",
|
|
1360
1384
|
...linkedTableCellProps
|
|
1361
|
-
}), /* @__PURE__ */
|
|
1385
|
+
}), /* @__PURE__ */ React26.createElement(BlockPayloadCountsTableCell, {
|
|
1362
1386
|
align: "left",
|
|
1363
1387
|
...linkedTableCellProps
|
|
1364
|
-
}), /* @__PURE__ */
|
|
1388
|
+
}), /* @__PURE__ */ React26.createElement(BlockVerificationTableCell, {
|
|
1365
1389
|
deepValidation,
|
|
1366
1390
|
...defaultTableCellProps
|
|
1367
|
-
}), /* @__PURE__ */
|
|
1391
|
+
}), /* @__PURE__ */ React26.createElement(BlockJsonViewTableCell, defaultTableCellProps));
|
|
1368
1392
|
}, "BlockChainTableRow");
|
|
1369
1393
|
|
|
1394
|
+
// src/components/account/table/AddressTableCell.tsx
|
|
1395
|
+
var AddressTableCell = /* @__PURE__ */ __name(({ address, linked, toolTipTitle, sx, ...props }) => {
|
|
1396
|
+
const [ref, dispatch] = useEvent4();
|
|
1397
|
+
const handleClick = /* @__PURE__ */ __name(() => dispatch("address", "click", address), "handleClick");
|
|
1398
|
+
return /* @__PURE__ */ React.createElement(TableCell10, {
|
|
1399
|
+
ref,
|
|
1400
|
+
sx: {
|
|
1401
|
+
cursor: linked ? "pointer" : "default",
|
|
1402
|
+
...sx
|
|
1403
|
+
},
|
|
1404
|
+
...props
|
|
1405
|
+
}, /* @__PURE__ */ React.createElement(Tooltip8, {
|
|
1406
|
+
title: toolTipTitle
|
|
1407
|
+
}, /* @__PURE__ */ React.createElement(BlockAddressChip, {
|
|
1408
|
+
address,
|
|
1409
|
+
onClick: handleClick
|
|
1410
|
+
})));
|
|
1411
|
+
}, "AddressTableCell");
|
|
1412
|
+
|
|
1413
|
+
// src/components/account/table/BalanceHistoryTable.tsx
|
|
1414
|
+
import { Table, TableBody as TableBody2, TableCell as TableCell13, TableHead as TableHead2, TableRow as TableRow4 } from "@mui/material";
|
|
1415
|
+
import { isDefined as isDefined5 } from "@xylabs/typeof";
|
|
1416
|
+
import React27 from "react";
|
|
1417
|
+
|
|
1418
|
+
// src/components/account/table/BalanceHistoryTableRow.tsx
|
|
1419
|
+
import { TableCell as TableCell12, TableRow as TableRow3 } from "@mui/material";
|
|
1420
|
+
import { RawInfoIconButton } from "@xyo-network/react-payload-raw-info";
|
|
1421
|
+
import { useMemo as useMemo10 } from "react";
|
|
1422
|
+
|
|
1423
|
+
// src/components/account/table/RawAmountTableCell.tsx
|
|
1424
|
+
import { Link as Link5, TableCell as TableCell11, Tooltip as Tooltip9 } from "@mui/material";
|
|
1425
|
+
import { toHex as toHex3 } from "@xylabs/hex";
|
|
1426
|
+
import { isDefined as isDefined4 } from "@xylabs/typeof";
|
|
1427
|
+
import { useEvent as useEvent5 } from "@xyo-network/react-event";
|
|
1428
|
+
import { XL1Amount } from "@xyo-network/xl1-protocol";
|
|
1429
|
+
var RawAmountTableCell = /* @__PURE__ */ __name(({ amount, linked, sx, type, ...props }) => {
|
|
1430
|
+
const [ref, dispatch] = useEvent5();
|
|
1431
|
+
const handleClick = /* @__PURE__ */ __name(() => dispatch("amount", "click", isDefined4(amount) ? toHex3(amount) : ""), "handleClick");
|
|
1432
|
+
const formatAmount = /* @__PURE__ */ __name((amount2) => {
|
|
1433
|
+
if (!isDefined4(amount2)) {
|
|
1434
|
+
return "N/A";
|
|
1435
|
+
}
|
|
1436
|
+
const xl1Amount = new XL1Amount(amount2);
|
|
1437
|
+
return xl1Amount.toString(void 0, {
|
|
1438
|
+
places: 18,
|
|
1439
|
+
maxDecimal: 12,
|
|
1440
|
+
maxCharacters: 12,
|
|
1441
|
+
minDecimals: 1,
|
|
1442
|
+
locale: navigator.language
|
|
1443
|
+
});
|
|
1444
|
+
}, "formatAmount");
|
|
1445
|
+
return /* @__PURE__ */ React.createElement(TableCell11, {
|
|
1446
|
+
ref,
|
|
1447
|
+
...props
|
|
1448
|
+
}, /* @__PURE__ */ React.createElement(Tooltip9, {
|
|
1449
|
+
title: `Raw Amount: ${amount}`
|
|
1450
|
+
}, linked ? /* @__PURE__ */ React.createElement(Link5, {
|
|
1451
|
+
onClick: handleClick,
|
|
1452
|
+
sx: {
|
|
1453
|
+
cursor: "pointer"
|
|
1454
|
+
}
|
|
1455
|
+
}, type === "send" ? "-" : "", formatAmount(amount)) : /* @__PURE__ */ React.createElement("span", null, type === "send" ? "-" : "", formatAmount(amount))));
|
|
1456
|
+
}, "RawAmountTableCell");
|
|
1457
|
+
|
|
1458
|
+
// src/components/account/table/BalanceHistoryTableRow.tsx
|
|
1459
|
+
var BalanceHistoryTableRow = /* @__PURE__ */ __name(({ linked, row, ...props }) => {
|
|
1460
|
+
const { amount, blockNumber, debug, from, key, timestamp, to, type, txHash } = row ?? {};
|
|
1461
|
+
const linkedTableCallProps = useMemo10(() => ({
|
|
1462
|
+
linked
|
|
1463
|
+
}), [
|
|
1464
|
+
linked
|
|
1465
|
+
]);
|
|
1466
|
+
return /* @__PURE__ */ React.createElement(TableRow3, {
|
|
1467
|
+
key,
|
|
1468
|
+
...props
|
|
1469
|
+
}, /* @__PURE__ */ React.createElement(TableCell12, null, txHash || "N/A"), /* @__PURE__ */ React.createElement(BlockNumberTableCellInner, {
|
|
1470
|
+
blockNumber,
|
|
1471
|
+
...linkedTableCallProps
|
|
1472
|
+
}), /* @__PURE__ */ React.createElement(BlockEpochTableCellInner, {
|
|
1473
|
+
epoch: timestamp,
|
|
1474
|
+
...linkedTableCallProps
|
|
1475
|
+
}), /* @__PURE__ */ React.createElement(AddressTableCell, {
|
|
1476
|
+
address: from,
|
|
1477
|
+
toolTipTitle: `From Address: ${from}`,
|
|
1478
|
+
...linkedTableCallProps
|
|
1479
|
+
}), /* @__PURE__ */ React.createElement(AddressTableCell, {
|
|
1480
|
+
address: to,
|
|
1481
|
+
toolTipTitle: `To Address: ${to}`,
|
|
1482
|
+
...linkedTableCallProps
|
|
1483
|
+
}), /* @__PURE__ */ React.createElement(RawAmountTableCell, {
|
|
1484
|
+
amount,
|
|
1485
|
+
type
|
|
1486
|
+
}), /* @__PURE__ */ React.createElement(TableCell12, null, /* @__PURE__ */ React.createElement(RawInfoIconButton, {
|
|
1487
|
+
rawValue: debug
|
|
1488
|
+
})));
|
|
1489
|
+
}, "BalanceHistoryTableRow");
|
|
1490
|
+
|
|
1491
|
+
// src/components/account/table/types/index.ts
|
|
1492
|
+
var TableHeadingLabels = [
|
|
1493
|
+
"Tx Hash",
|
|
1494
|
+
"BlockNumber",
|
|
1495
|
+
"Timestamp",
|
|
1496
|
+
"From",
|
|
1497
|
+
"To",
|
|
1498
|
+
"Amount",
|
|
1499
|
+
"Debug"
|
|
1500
|
+
];
|
|
1501
|
+
|
|
1502
|
+
// src/components/account/table/BalanceHistoryTable.tsx
|
|
1503
|
+
var AccountBalanceHistoryTable = /* @__PURE__ */ __name(({ history, linked, ...props }) => {
|
|
1504
|
+
return isDefined5(history) ? /* @__PURE__ */ React27.createElement(Table, props, /* @__PURE__ */ React27.createElement(TableHead2, null, /* @__PURE__ */ React27.createElement(TableRow4, null, TableHeadingLabels.map((heading) => /* @__PURE__ */ React27.createElement(TableCell13, {
|
|
1505
|
+
key: heading
|
|
1506
|
+
}, heading)))), /* @__PURE__ */ React27.createElement(TableBody2, null, history?.map((row) => /* @__PURE__ */ React27.createElement(BalanceHistoryTableRow, {
|
|
1507
|
+
key: row.key,
|
|
1508
|
+
linked,
|
|
1509
|
+
row
|
|
1510
|
+
})))) : null;
|
|
1511
|
+
}, "AccountBalanceHistoryTable");
|
|
1512
|
+
|
|
1513
|
+
// src/components/account/BalanceHistoryFlexbox.tsx
|
|
1514
|
+
var AccountBalanceHistoryFlexBox = /* @__PURE__ */ __name(({ address, refresh, viewer, ...props }) => {
|
|
1515
|
+
const [results, error] = useAccountBalanceHistory(address, viewer, refresh);
|
|
1516
|
+
const { history, balance, truncated } = results || {
|
|
1517
|
+
balance: [
|
|
1518
|
+
AttoXL1(0n),
|
|
1519
|
+
AttoXL1(0n)
|
|
1520
|
+
],
|
|
1521
|
+
history: void 0
|
|
1522
|
+
};
|
|
1523
|
+
const formatBalance = /* @__PURE__ */ __name((balance2) => {
|
|
1524
|
+
const xl1Amount = new XL1Amount2(balance2);
|
|
1525
|
+
return xl1Amount.toString(void 0, {
|
|
1526
|
+
places: 18,
|
|
1527
|
+
maxDecimal: 12,
|
|
1528
|
+
maxCharacters: 12,
|
|
1529
|
+
minDecimals: 1,
|
|
1530
|
+
locale: navigator.language
|
|
1531
|
+
});
|
|
1532
|
+
}, "formatBalance");
|
|
1533
|
+
const formatBalanceMagnitude = /* @__PURE__ */ __name((set) => {
|
|
1534
|
+
const [received, sent] = set;
|
|
1535
|
+
const netBalance = received - sent;
|
|
1536
|
+
return netBalance < 0n ? `-${formatBalance(sent - received)}` : formatBalance(netBalance);
|
|
1537
|
+
}, "formatBalanceMagnitude");
|
|
1538
|
+
return isDefined6(history) && isDefined6(address) ? /* @__PURE__ */ React28.createElement(FlexCol3, props, /* @__PURE__ */ React28.createElement(ErrorRender3, {
|
|
1539
|
+
error,
|
|
1540
|
+
scope: "AccountBalanceHistoryTable"
|
|
1541
|
+
}), /* @__PURE__ */ React28.createElement(Typography6, {
|
|
1542
|
+
variant: "h6",
|
|
1543
|
+
gutterBottom: true
|
|
1544
|
+
}, formatBalanceMagnitude(balance)), truncated ? /* @__PURE__ */ React28.createElement(Typography6, {
|
|
1545
|
+
variant: "caption",
|
|
1546
|
+
gutterBottom: true
|
|
1547
|
+
}, "Ranged Balance from", " ", history.at(-1).blockNumber, " ", "-", " ", history[0].blockNumber) : null, /* @__PURE__ */ React28.createElement(AccountBalanceHistoryTable, {
|
|
1548
|
+
history
|
|
1549
|
+
})) : null;
|
|
1550
|
+
}, "AccountBalanceHistoryFlexBox");
|
|
1551
|
+
|
|
1370
1552
|
// src/components/chain/controls/PollingControlsFlexbox.tsx
|
|
1371
1553
|
import { Autorenew, Pause } from "@mui/icons-material";
|
|
1372
|
-
import { Alert as Alert3, AlertTitle as AlertTitle2, Grow, Icon as Icon2, IconButton as IconButton4, Tooltip as
|
|
1554
|
+
import { Alert as Alert3, AlertTitle as AlertTitle2, Grow, Icon as Icon2, IconButton as IconButton4, Tooltip as Tooltip10 } from "@mui/material";
|
|
1373
1555
|
import { FlexRow as FlexRow6 } from "@xylabs/react-flexbox";
|
|
1374
|
-
import
|
|
1556
|
+
import React33, { memo } from "react";
|
|
1375
1557
|
|
|
1376
1558
|
// src/components/chain/stats/Dialog.tsx
|
|
1377
1559
|
import { QueryStats } from "@mui/icons-material";
|
|
1378
1560
|
import { Dialog as Dialog3, DialogContent as DialogContent3, DialogTitle as DialogTitle3, IconButton as IconButton3 } from "@mui/material";
|
|
1379
|
-
import
|
|
1561
|
+
import React31, { useState as useState12 } from "react";
|
|
1380
1562
|
|
|
1381
1563
|
// src/components/chain/stats/producer/ProducerFlexbox.tsx
|
|
1382
|
-
import { ListItem, styled, Typography as
|
|
1383
|
-
import { ErrorRender as
|
|
1384
|
-
import { FlexCol as
|
|
1564
|
+
import { ListItem, styled, Typography as Typography7 } from "@mui/material";
|
|
1565
|
+
import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
|
|
1566
|
+
import { FlexCol as FlexCol4 } from "@xylabs/react-flexbox";
|
|
1385
1567
|
import { isChainSummaryProducers } from "@xyo-network/chain-analyze";
|
|
1386
|
-
import
|
|
1568
|
+
import React30, { useMemo as useMemo11 } from "react";
|
|
1387
1569
|
|
|
1388
1570
|
// src/components/chain/stats/producer/Table.tsx
|
|
1389
|
-
import { Table, TableBody as
|
|
1571
|
+
import { Table as Table2, TableBody as TableBody3, TableCell as TableCell14, TableHead as TableHead3, TableRow as TableRow5, useTheme as useTheme2 } from "@mui/material";
|
|
1390
1572
|
import { BlockiesAvatar as BlockiesAvatar2 } from "@xyo-network/react-chain-blockies";
|
|
1391
|
-
import
|
|
1573
|
+
import React29 from "react";
|
|
1392
1574
|
var ChainProducerStatsTable = /* @__PURE__ */ __name(({ producers, ...props }) => {
|
|
1393
1575
|
const theme = useTheme2();
|
|
1394
|
-
return /* @__PURE__ */
|
|
1576
|
+
return /* @__PURE__ */ React29.createElement(Table2, props, /* @__PURE__ */ React29.createElement(TableHead3, null, /* @__PURE__ */ React29.createElement(TableRow5, null, /* @__PURE__ */ React29.createElement(TableCell14, null, "Address"), /* @__PURE__ */ React29.createElement(TableCell14, null, "Blocks Produced"), /* @__PURE__ */ React29.createElement(TableCell14, null, "Rewards Earned Produced"))), /* @__PURE__ */ React29.createElement(TableBody3, null, producers?.map((producer) => /* @__PURE__ */ React29.createElement(TableRow5, {
|
|
1395
1577
|
key: producer.address
|
|
1396
|
-
}, /* @__PURE__ */
|
|
1578
|
+
}, /* @__PURE__ */ React29.createElement(TableCell14, null, /* @__PURE__ */ React29.createElement(BlockiesAvatar2, {
|
|
1397
1579
|
blockiesOptions: {
|
|
1398
1580
|
seed: producer.address
|
|
1399
1581
|
},
|
|
@@ -1401,12 +1583,12 @@ var ChainProducerStatsTable = /* @__PURE__ */ __name(({ producers, ...props }) =
|
|
|
1401
1583
|
height: theme.spacing(2.75),
|
|
1402
1584
|
width: theme.spacing(2.75)
|
|
1403
1585
|
}
|
|
1404
|
-
})), /* @__PURE__ */
|
|
1586
|
+
})), /* @__PURE__ */ React29.createElement(TableCell14, null, producer.blocksProduced.toString()), /* @__PURE__ */ React29.createElement(TableCell14, null, producer.rewardsEarned.toString())))));
|
|
1405
1587
|
}, "ChainProducerStatsTable");
|
|
1406
1588
|
|
|
1407
1589
|
// src/components/chain/stats/producer/ProducerFlexbox.tsx
|
|
1408
1590
|
var BlockProducerStatsFlexbox = /* @__PURE__ */ __name(({ payload, ...props }) => {
|
|
1409
|
-
const [producer, producerError] =
|
|
1591
|
+
const [producer, producerError] = useMemo11(() => {
|
|
1410
1592
|
if (payload) {
|
|
1411
1593
|
return isChainSummaryProducers(payload) ? [
|
|
1412
1594
|
payload
|
|
@@ -1420,19 +1602,19 @@ var BlockProducerStatsFlexbox = /* @__PURE__ */ __name(({ payload, ...props }) =
|
|
|
1420
1602
|
}, [
|
|
1421
1603
|
payload
|
|
1422
1604
|
]);
|
|
1423
|
-
const producersArray =
|
|
1605
|
+
const producersArray = useMemo11(() => Object.values(producer?.producers ?? {}), [
|
|
1424
1606
|
producer
|
|
1425
1607
|
]);
|
|
1426
|
-
return /* @__PURE__ */
|
|
1608
|
+
return /* @__PURE__ */ React30.createElement(FlexCol4, {
|
|
1427
1609
|
alignItems: "start",
|
|
1428
1610
|
gap: 1,
|
|
1429
1611
|
...props
|
|
1430
|
-
}, /* @__PURE__ */
|
|
1612
|
+
}, /* @__PURE__ */ React30.createElement(ErrorRender4, {
|
|
1431
1613
|
error: producerError,
|
|
1432
1614
|
scope: "BlockProducerStatsFlexbox"
|
|
1433
|
-
}), /* @__PURE__ */
|
|
1615
|
+
}), /* @__PURE__ */ React30.createElement(Typography7, {
|
|
1434
1616
|
fontSize: "1rem"
|
|
1435
|
-
}, "Block Producers"), /* @__PURE__ */
|
|
1617
|
+
}, "Block Producers"), /* @__PURE__ */ React30.createElement(ChainProducerStatsTable, {
|
|
1436
1618
|
producers: producersArray
|
|
1437
1619
|
}));
|
|
1438
1620
|
}, "BlockProducerStatsFlexbox");
|
|
@@ -1444,18 +1626,18 @@ var StyledListItem = styled(ListItem)(() => ({
|
|
|
1444
1626
|
// src/components/chain/stats/Dialog.tsx
|
|
1445
1627
|
var ChainAnalyzerStatsDialog = /* @__PURE__ */ __name((props) => {
|
|
1446
1628
|
const { analyzers, statsUpdated } = useChainAnalyzersContext();
|
|
1447
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ React31.createElement(Dialog3, props, /* @__PURE__ */ React31.createElement(DialogTitle3, null, "Chain Analysis"), /* @__PURE__ */ React31.createElement(DialogContent3, null, statsUpdated > 0 ? Object.entries(analyzers).map(([id2, analyzer]) => /* @__PURE__ */ React31.createElement("div", {
|
|
1448
1630
|
key: id2
|
|
1449
|
-
}, id2 === "producers" ? /* @__PURE__ */
|
|
1631
|
+
}, id2 === "producers" ? /* @__PURE__ */ React31.createElement(BlockProducerStatsFlexbox, {
|
|
1450
1632
|
payload: analyzer.result()
|
|
1451
1633
|
}) : null)) : null));
|
|
1452
1634
|
}, "ChainAnalyzerStatsDialog");
|
|
1453
1635
|
var ChainAnalyzerStatsDialogFromContext = /* @__PURE__ */ __name((props) => {
|
|
1454
1636
|
const [open, setOpen] = useState12(false);
|
|
1455
1637
|
const handleClose = /* @__PURE__ */ __name(() => setOpen(false), "handleClose");
|
|
1456
|
-
return /* @__PURE__ */
|
|
1638
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(IconButton3, {
|
|
1457
1639
|
onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
|
|
1458
|
-
}, /* @__PURE__ */
|
|
1640
|
+
}, /* @__PURE__ */ React31.createElement(QueryStats, null)), /* @__PURE__ */ React31.createElement(ChainAnalyzerStatsDialog, {
|
|
1459
1641
|
onClose: handleClose,
|
|
1460
1642
|
open,
|
|
1461
1643
|
...props
|
|
@@ -1464,19 +1646,19 @@ var ChainAnalyzerStatsDialogFromContext = /* @__PURE__ */ __name((props) => {
|
|
|
1464
1646
|
|
|
1465
1647
|
// src/components/chain/controls/PulseSvgIcon.tsx
|
|
1466
1648
|
import { createSvgIcon, keyframes, styled as styled2 } from "@mui/material";
|
|
1467
|
-
import
|
|
1468
|
-
var PulseSvgIcon = createSvgIcon(/* @__PURE__ */
|
|
1649
|
+
import React32 from "react";
|
|
1650
|
+
var PulseSvgIcon = createSvgIcon(/* @__PURE__ */ React32.createElement("svg", {
|
|
1469
1651
|
viewBox: "0 0 80 80",
|
|
1470
1652
|
version: "1.1",
|
|
1471
1653
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1472
|
-
}, /* @__PURE__ */
|
|
1654
|
+
}, /* @__PURE__ */ React32.createElement("g", {
|
|
1473
1655
|
transform: "translate(34,34)"
|
|
1474
|
-
}, /* @__PURE__ */
|
|
1656
|
+
}, /* @__PURE__ */ React32.createElement("circle", {
|
|
1475
1657
|
className: "core",
|
|
1476
1658
|
cx: "0",
|
|
1477
1659
|
cy: "0",
|
|
1478
1660
|
r: "6"
|
|
1479
|
-
}), /* @__PURE__ */
|
|
1661
|
+
}), /* @__PURE__ */ React32.createElement("circle", {
|
|
1480
1662
|
className: "radar",
|
|
1481
1663
|
cx: "0",
|
|
1482
1664
|
cy: "0",
|
|
@@ -1540,24 +1722,24 @@ var StyledPulseSvgIcon = styled2(PulseSvgIcon)(({ theme }) => {
|
|
|
1540
1722
|
var PollingControlsFlexbox = /* @__PURE__ */ __name(({ blocksBehind, pollingState, setPollingState }) => {
|
|
1541
1723
|
const paused = pollingState === "paused";
|
|
1542
1724
|
const running = pollingState === "running";
|
|
1543
|
-
return /* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ React33.createElement(FlexRow6, {
|
|
1544
1726
|
justifyContent: "space-between",
|
|
1545
1727
|
width: "100%"
|
|
1546
|
-
}, /* @__PURE__ */
|
|
1728
|
+
}, /* @__PURE__ */ React33.createElement(FlexRow6, {
|
|
1547
1729
|
gap: 2
|
|
1548
|
-
}, running ? /* @__PURE__ */
|
|
1730
|
+
}, running ? /* @__PURE__ */ React33.createElement(IconButton4, {
|
|
1549
1731
|
onClick: /* @__PURE__ */ __name(() => setPollingState?.("paused"), "onClick"),
|
|
1550
1732
|
title: "Pause Block Stream"
|
|
1551
|
-
}, /* @__PURE__ */
|
|
1733
|
+
}, /* @__PURE__ */ React33.createElement(Pause, null)) : null, paused ? /* @__PURE__ */ React33.createElement(IconButton4, {
|
|
1552
1734
|
onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick"),
|
|
1553
1735
|
title: "Re-Sync Block Stream"
|
|
1554
|
-
}, /* @__PURE__ */
|
|
1736
|
+
}, /* @__PURE__ */ React33.createElement(Autorenew, null)) : null, /* @__PURE__ */ React33.createElement(ChainAnalyzerStatsDialogFromContext, null)), /* @__PURE__ */ React33.createElement(FlexRow6, {
|
|
1555
1737
|
gap: 2
|
|
1556
|
-
}, /* @__PURE__ */
|
|
1738
|
+
}, /* @__PURE__ */ React33.createElement(Grow, {
|
|
1557
1739
|
in: (blocksBehind ?? 0) > 0
|
|
1558
|
-
}, /* @__PURE__ */
|
|
1740
|
+
}, /* @__PURE__ */ React33.createElement(Tooltip10, {
|
|
1559
1741
|
title: "Click to Re-Sync"
|
|
1560
|
-
}, /* @__PURE__ */
|
|
1742
|
+
}, /* @__PURE__ */ React33.createElement(Alert3, {
|
|
1561
1743
|
sx: {
|
|
1562
1744
|
py: 0,
|
|
1563
1745
|
px: 1,
|
|
@@ -1565,11 +1747,11 @@ var PollingControlsFlexbox = /* @__PURE__ */ __name(({ blocksBehind, pollingStat
|
|
|
1565
1747
|
},
|
|
1566
1748
|
severity: "warning",
|
|
1567
1749
|
onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick")
|
|
1568
|
-
}, /* @__PURE__ */
|
|
1750
|
+
}, /* @__PURE__ */ React33.createElement(AlertTitle2, {
|
|
1569
1751
|
sx: {
|
|
1570
1752
|
mb: 0
|
|
1571
1753
|
}
|
|
1572
|
-
}, "Behind:", " ", blocksBehind)))), /* @__PURE__ */
|
|
1754
|
+
}, "Behind:", " ", blocksBehind)))), /* @__PURE__ */ React33.createElement(Icon2, null, /* @__PURE__ */ React33.createElement(StyledPulseSvgIcon, {
|
|
1573
1755
|
className: running ? "" : "paused"
|
|
1574
1756
|
}))));
|
|
1575
1757
|
}, "PollingControlsFlexbox");
|
|
@@ -1577,12 +1759,12 @@ var MemoizedPollingControlsFlexbox = /* @__PURE__ */ memo(PollingControlsFlexbox
|
|
|
1577
1759
|
|
|
1578
1760
|
// src/components/chain/dialog/Dialog.tsx
|
|
1579
1761
|
import { Button as Button4, Dialog as Dialog4, DialogActions as DialogActions3, DialogContent as DialogContent4 } from "@mui/material";
|
|
1580
|
-
import
|
|
1762
|
+
import React34 from "react";
|
|
1581
1763
|
var TransactionsDialog = /* @__PURE__ */ __name(({ onClose, ...props }) => {
|
|
1582
|
-
return /* @__PURE__ */
|
|
1764
|
+
return /* @__PURE__ */ React34.createElement(Dialog4, {
|
|
1583
1765
|
onClose,
|
|
1584
1766
|
...props
|
|
1585
|
-
}, /* @__PURE__ */
|
|
1767
|
+
}, /* @__PURE__ */ React34.createElement(DialogContent4, null, "Transactions Dialog"), /* @__PURE__ */ React34.createElement(DialogActions3, null, /* @__PURE__ */ React34.createElement(Button4, {
|
|
1586
1768
|
variant: "outlined",
|
|
1587
1769
|
onClick: /* @__PURE__ */ __name((e) => onClose?.(e, "escapeKeyDown"), "onClick")
|
|
1588
1770
|
}, "Close")));
|
|
@@ -1622,9 +1804,9 @@ var useOnBlock = /* @__PURE__ */ __name((initialHeadNumber, onAddBlock, liveHead
|
|
|
1622
1804
|
|
|
1623
1805
|
// src/components/chain/pagination/BlockChainPagination.tsx
|
|
1624
1806
|
import { TablePaginationActions } from "@xyo-network/react-payload-table";
|
|
1625
|
-
import
|
|
1807
|
+
import React35 from "react";
|
|
1626
1808
|
var BlockChainPagination = /* @__PURE__ */ __name(({ count = 0, onPageChange, page, rowsPerPage = 10 }) => {
|
|
1627
|
-
return /* @__PURE__ */
|
|
1809
|
+
return /* @__PURE__ */ React35.createElement(TablePaginationActions, {
|
|
1628
1810
|
count,
|
|
1629
1811
|
onPageChange,
|
|
1630
1812
|
page,
|
|
@@ -1633,10 +1815,10 @@ var BlockChainPagination = /* @__PURE__ */ __name(({ count = 0, onPageChange, pa
|
|
|
1633
1815
|
}, "BlockChainPagination");
|
|
1634
1816
|
|
|
1635
1817
|
// src/components/chain/pagination/hooks/usePagination.tsx
|
|
1636
|
-
import { useMemo as
|
|
1818
|
+
import { useMemo as useMemo12, useState as useState13 } from "react";
|
|
1637
1819
|
var useChainPagination = /* @__PURE__ */ __name((pageSize, blockComponents) => {
|
|
1638
1820
|
const [page, setPage] = useState13(0);
|
|
1639
|
-
const paginatedBlockComponents =
|
|
1821
|
+
const paginatedBlockComponents = useMemo12(() => {
|
|
1640
1822
|
const startIndex = page * pageSize;
|
|
1641
1823
|
const endIndex = startIndex + pageSize;
|
|
1642
1824
|
return blockComponents?.slice(startIndex, endIndex);
|
|
@@ -1656,18 +1838,18 @@ var useChainPagination = /* @__PURE__ */ __name((pageSize, blockComponents) => {
|
|
|
1656
1838
|
}, "useChainPagination");
|
|
1657
1839
|
|
|
1658
1840
|
// src/components/chain/render/static/flexbox/variants/Base.tsx
|
|
1659
|
-
import { ErrorRender as
|
|
1660
|
-
import { FlexCol as
|
|
1661
|
-
import
|
|
1841
|
+
import { ErrorRender as ErrorRender5 } from "@xylabs/react-error";
|
|
1842
|
+
import { FlexCol as FlexCol6, FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
|
|
1843
|
+
import React37 from "react";
|
|
1662
1844
|
|
|
1663
1845
|
// src/components/chain/list/Animated.tsx
|
|
1664
1846
|
import { AnimatedList } from "@xylabs/react-animation";
|
|
1665
|
-
import
|
|
1847
|
+
import React36 from "react";
|
|
1666
1848
|
|
|
1667
1849
|
// src/components/chain/styled/BlockListWrapperFlexbox.tsx
|
|
1668
1850
|
import { styled as styled3 } from "@mui/material";
|
|
1669
|
-
import { FlexCol as
|
|
1670
|
-
var BlockListWrapperFlexBox = styled3(
|
|
1851
|
+
import { FlexCol as FlexCol5 } from "@xylabs/react-flexbox";
|
|
1852
|
+
var BlockListWrapperFlexBox = styled3(FlexCol5, {
|
|
1671
1853
|
name: "BlockListWrapperFlexbox"
|
|
1672
1854
|
})(() => ({
|
|
1673
1855
|
"& > div:nth-of-type(2) .block-heading-flexbox .divider-spacer": {
|
|
@@ -1683,10 +1865,10 @@ var BlockListWrapperFlexBox = styled3(FlexCol4, {
|
|
|
1683
1865
|
|
|
1684
1866
|
// src/components/chain/list/Animated.tsx
|
|
1685
1867
|
var BlockListAnimated = /* @__PURE__ */ __name(({ blockChainRenderComponents }) => {
|
|
1686
|
-
return /* @__PURE__ */
|
|
1868
|
+
return /* @__PURE__ */ React36.createElement(BlockListWrapperFlexBox, {
|
|
1687
1869
|
alignItems: "stretch",
|
|
1688
1870
|
width: "100%"
|
|
1689
|
-
}, /* @__PURE__ */
|
|
1871
|
+
}, /* @__PURE__ */ React36.createElement(AnimatedList, {
|
|
1690
1872
|
fullWidth: true,
|
|
1691
1873
|
items: blockChainRenderComponents
|
|
1692
1874
|
}));
|
|
@@ -1694,12 +1876,12 @@ var BlockListAnimated = /* @__PURE__ */ __name(({ blockChainRenderComponents })
|
|
|
1694
1876
|
|
|
1695
1877
|
// src/components/chain/render/static/hooks/useStaticBlockRenderComponents.ts
|
|
1696
1878
|
import { exists } from "@xylabs/exists";
|
|
1697
|
-
import { useMemo as
|
|
1879
|
+
import { useMemo as useMemo13 } from "react";
|
|
1698
1880
|
var DEFAULT_PAGE_SIZE = 25;
|
|
1699
1881
|
var useStaticBlockRenderComponents = /* @__PURE__ */ __name((BlockComponent, blockChainRenderProps) => {
|
|
1700
1882
|
const { maxBlocks } = blockChainRenderProps ?? {};
|
|
1701
1883
|
const pageSize = blockChainRenderProps?.pageSize ?? DEFAULT_PAGE_SIZE;
|
|
1702
|
-
const chainIteratorParams =
|
|
1884
|
+
const chainIteratorParams = useMemo13(() => blockChainRenderProps ?? {
|
|
1703
1885
|
name: "unknown"
|
|
1704
1886
|
}, [
|
|
1705
1887
|
blockChainRenderProps
|
|
@@ -1725,24 +1907,24 @@ var useStaticBlockRenderComponents = /* @__PURE__ */ __name((BlockComponent, blo
|
|
|
1725
1907
|
// src/components/chain/render/static/flexbox/variants/Base.tsx
|
|
1726
1908
|
var StaticListBase = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
|
|
1727
1909
|
const { blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize } = useStaticBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
|
|
1728
|
-
return /* @__PURE__ */
|
|
1910
|
+
return /* @__PURE__ */ React37.createElement(FlexCol6, {
|
|
1729
1911
|
alignItems: "start",
|
|
1730
1912
|
gap: 2,
|
|
1731
1913
|
width: "100%",
|
|
1732
1914
|
...props
|
|
1733
|
-
}, errors?.map((error) => /* @__PURE__ */
|
|
1915
|
+
}, errors?.map((error) => /* @__PURE__ */ React37.createElement(ErrorRender5, {
|
|
1734
1916
|
error,
|
|
1735
1917
|
key: error.name,
|
|
1736
1918
|
scope: "StaticBlockchainFlexboxInner"
|
|
1737
|
-
})), (paginatedBlockComponents?.length ?? 0) > 0 ? /* @__PURE__ */
|
|
1919
|
+
})), (paginatedBlockComponents?.length ?? 0) > 0 ? /* @__PURE__ */ React37.createElement(FlexGrowRow2, {
|
|
1738
1920
|
justifyContent: "space-between",
|
|
1739
1921
|
width: "100%"
|
|
1740
|
-
}, /* @__PURE__ */
|
|
1922
|
+
}, /* @__PURE__ */ React37.createElement(ChainAnalyzerStatsDialogFromContext, null), /* @__PURE__ */ React37.createElement(BlockChainPagination, {
|
|
1741
1923
|
count: blockComponents?.length ?? 0,
|
|
1742
1924
|
onPageChange,
|
|
1743
1925
|
page,
|
|
1744
1926
|
rowsPerPage: pageSize
|
|
1745
|
-
})) : null, /* @__PURE__ */
|
|
1927
|
+
})) : null, /* @__PURE__ */ React37.createElement(BlockListAnimated, {
|
|
1746
1928
|
blockChainRenderComponents: paginatedBlockComponents
|
|
1747
1929
|
}));
|
|
1748
1930
|
}, "StaticListBase");
|
|
@@ -1750,10 +1932,10 @@ var StaticListBase = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }
|
|
|
1750
1932
|
// src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx
|
|
1751
1933
|
import { isAddress } from "@xylabs/hex";
|
|
1752
1934
|
import { ChainProducersAnalyzer } from "@xyo-network/chain-analyze";
|
|
1753
|
-
import
|
|
1935
|
+
import React38, { useMemo as useMemo14 } from "react";
|
|
1754
1936
|
var WithAnalysis = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
|
|
1755
1937
|
const { chainId } = blockChainRenderProps ?? {};
|
|
1756
|
-
const analyzers =
|
|
1938
|
+
const analyzers = useMemo14(() => {
|
|
1757
1939
|
if (isAddress(chainId)) {
|
|
1758
1940
|
return {
|
|
1759
1941
|
producers: new ChainProducersAnalyzer()
|
|
@@ -1762,9 +1944,9 @@ var WithAnalysis = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props })
|
|
|
1762
1944
|
}, [
|
|
1763
1945
|
chainId
|
|
1764
1946
|
]);
|
|
1765
|
-
return /* @__PURE__ */
|
|
1947
|
+
return /* @__PURE__ */ React38.createElement(ChainAnalyzersProvider, {
|
|
1766
1948
|
analyzers
|
|
1767
|
-
}, /* @__PURE__ */
|
|
1949
|
+
}, /* @__PURE__ */ React38.createElement(StaticListBase, {
|
|
1768
1950
|
blockChainRenderProps,
|
|
1769
1951
|
...props
|
|
1770
1952
|
}));
|
|
@@ -1777,21 +1959,21 @@ var StaticBlockchainRenderFlexBox = {
|
|
|
1777
1959
|
};
|
|
1778
1960
|
|
|
1779
1961
|
// src/components/payload/builder/Flexbox.tsx
|
|
1780
|
-
import { FlexCol as
|
|
1962
|
+
import { FlexCol as FlexCol7 } from "@xylabs/react-flexbox";
|
|
1781
1963
|
import { JsonViewerEx as JsonViewerEx2 } from "@xyo-network/react-payload-raw-info";
|
|
1782
|
-
import
|
|
1964
|
+
import React39, { useState as useState14 } from "react";
|
|
1783
1965
|
var PayloadBuilderFlexbox = /* @__PURE__ */ __name(({ BuilderComponent, onBuild, ...props }) => {
|
|
1784
1966
|
const [payload, setPayload] = useState14();
|
|
1785
1967
|
const onBuildLocal = /* @__PURE__ */ __name((payload2) => {
|
|
1786
1968
|
onBuild?.(payload2);
|
|
1787
1969
|
setPayload(payload2);
|
|
1788
1970
|
}, "onBuildLocal");
|
|
1789
|
-
return /* @__PURE__ */
|
|
1971
|
+
return /* @__PURE__ */ React39.createElement(FlexCol7, {
|
|
1790
1972
|
gap: 2,
|
|
1791
1973
|
...props
|
|
1792
|
-
}, /* @__PURE__ */
|
|
1974
|
+
}, /* @__PURE__ */ React39.createElement(BuilderComponent, {
|
|
1793
1975
|
onBuild: onBuildLocal
|
|
1794
|
-
}), payload ? /* @__PURE__ */
|
|
1976
|
+
}), payload ? /* @__PURE__ */ React39.createElement(JsonViewerEx2, {
|
|
1795
1977
|
value: payload
|
|
1796
1978
|
}) : null);
|
|
1797
1979
|
}, "PayloadBuilderFlexbox");
|
|
@@ -1799,11 +1981,11 @@ var PayloadBuilderFlexbox = /* @__PURE__ */ __name(({ BuilderComponent, onBuild,
|
|
|
1799
1981
|
// src/components/payload/builder/producer-intent/Form.tsx
|
|
1800
1982
|
import { Button as Button5, FormControl as FormControl5 } from "@mui/material";
|
|
1801
1983
|
import { createProducerChainStakeIntent } from "@xyo-network/chain-protocol";
|
|
1802
|
-
import
|
|
1984
|
+
import React42, { useMemo as useMemo16, useState as useState17 } from "react";
|
|
1803
1985
|
|
|
1804
1986
|
// src/components/payload/fields/BlockNumberTextField.tsx
|
|
1805
1987
|
import { FormControl as FormControl3, FormHelperText as FormHelperText2, TextField as TextField3 } from "@mui/material";
|
|
1806
|
-
import
|
|
1988
|
+
import React40, { useState as useState15 } from "react";
|
|
1807
1989
|
var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumberChanged, onChange, ...props }) => {
|
|
1808
1990
|
const [blockNumber, setBlockNumber] = useState15();
|
|
1809
1991
|
const handleChange = /* @__PURE__ */ __name((e) => {
|
|
@@ -1813,15 +1995,15 @@ var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumber
|
|
|
1813
1995
|
onChange?.(e);
|
|
1814
1996
|
}, "handleChange");
|
|
1815
1997
|
const errored = errorMessage !== void 0;
|
|
1816
|
-
return /* @__PURE__ */
|
|
1998
|
+
return /* @__PURE__ */ React40.createElement(FormControl3, {
|
|
1817
1999
|
fullWidth: true
|
|
1818
|
-
}, /* @__PURE__ */
|
|
2000
|
+
}, /* @__PURE__ */ React40.createElement(TextField3, {
|
|
1819
2001
|
error: errored,
|
|
1820
2002
|
onChange: handleChange,
|
|
1821
2003
|
type: "number",
|
|
1822
2004
|
value: blockNumber ?? "",
|
|
1823
2005
|
...props
|
|
1824
|
-
}), errored ? /* @__PURE__ */
|
|
2006
|
+
}), errored ? /* @__PURE__ */ React40.createElement(FormHelperText2, {
|
|
1825
2007
|
sx: {
|
|
1826
2008
|
color: "error.main"
|
|
1827
2009
|
}
|
|
@@ -1831,11 +2013,11 @@ var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumber
|
|
|
1831
2013
|
// src/components/payload/fields/XyoAddressTextField.tsx
|
|
1832
2014
|
import { FormControl as FormControl4, FormHelperText as FormHelperText3, TextField as TextField4 } from "@mui/material";
|
|
1833
2015
|
import { asAddress, isAddress as isAddress2 } from "@xylabs/hex";
|
|
1834
|
-
import
|
|
2016
|
+
import React41, { useMemo as useMemo15, useState as useState16 } from "react";
|
|
1835
2017
|
var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange, resetValue, ...props }) => {
|
|
1836
2018
|
const [address, setAddress] = useState16("");
|
|
1837
2019
|
const [addressError, setAddressError] = useState16();
|
|
1838
|
-
|
|
2020
|
+
useMemo15(() => setAddress(""), [
|
|
1839
2021
|
resetValue
|
|
1840
2022
|
]);
|
|
1841
2023
|
const handleChange = /* @__PURE__ */ __name((event) => {
|
|
@@ -1855,15 +2037,15 @@ var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange,
|
|
|
1855
2037
|
onAddressChanged?.();
|
|
1856
2038
|
}
|
|
1857
2039
|
}, "handleBlur");
|
|
1858
|
-
return /* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ React41.createElement(FormControl4, {
|
|
1859
2041
|
fullWidth: true
|
|
1860
|
-
}, /* @__PURE__ */
|
|
2042
|
+
}, /* @__PURE__ */ React41.createElement(TextField4, {
|
|
1861
2043
|
error: !!addressError,
|
|
1862
2044
|
onBlur: handleBlur,
|
|
1863
2045
|
onChange: handleChange,
|
|
1864
2046
|
value: address,
|
|
1865
2047
|
...props
|
|
1866
|
-
}), addressError ? /* @__PURE__ */
|
|
2048
|
+
}), addressError ? /* @__PURE__ */ React41.createElement(FormHelperText3, {
|
|
1867
2049
|
sx: {
|
|
1868
2050
|
color: "error.main"
|
|
1869
2051
|
}
|
|
@@ -1876,7 +2058,7 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
1876
2058
|
const [exp, setExp] = useState17();
|
|
1877
2059
|
const [nbf, setNbf] = useState17();
|
|
1878
2060
|
const [blockRangeError, setBlockRangeError] = useState17();
|
|
1879
|
-
const intentPayload =
|
|
2061
|
+
const intentPayload = useMemo16(() => {
|
|
1880
2062
|
if (exp !== void 0 && nbf !== void 0) {
|
|
1881
2063
|
if (exp <= nbf) {
|
|
1882
2064
|
setBlockRangeError(new Error("Expires must be greater than Not Before"));
|
|
@@ -1896,33 +2078,33 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
1896
2078
|
const onBuildLocal = /* @__PURE__ */ __name(() => {
|
|
1897
2079
|
if (onBuild && intentPayload) onBuild?.(intentPayload);
|
|
1898
2080
|
}, "onBuildLocal");
|
|
1899
|
-
return /* @__PURE__ */
|
|
2081
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(FormControl5, {
|
|
1900
2082
|
fullWidth: true
|
|
1901
|
-
}, /* @__PURE__ */
|
|
2083
|
+
}, /* @__PURE__ */ React42.createElement(XyoAddressTextField, {
|
|
1902
2084
|
label: "Delegate",
|
|
1903
2085
|
name: "delegate",
|
|
1904
2086
|
onAddressChanged: setDelegate,
|
|
1905
2087
|
required: true,
|
|
1906
2088
|
size: "small"
|
|
1907
|
-
})), /* @__PURE__ */
|
|
2089
|
+
})), /* @__PURE__ */ React42.createElement(FormControl5, {
|
|
1908
2090
|
fullWidth: true
|
|
1909
|
-
}, /* @__PURE__ */
|
|
2091
|
+
}, /* @__PURE__ */ React42.createElement(BlockNumberTextField, {
|
|
1910
2092
|
errorMessage: blockRangeError?.message,
|
|
1911
2093
|
label: "Expires",
|
|
1912
2094
|
name: "exp",
|
|
1913
2095
|
onBlockNumberChanged: setExp,
|
|
1914
2096
|
required: true,
|
|
1915
2097
|
size: "small"
|
|
1916
|
-
})), /* @__PURE__ */
|
|
2098
|
+
})), /* @__PURE__ */ React42.createElement(FormControl5, {
|
|
1917
2099
|
fullWidth: true
|
|
1918
|
-
}, /* @__PURE__ */
|
|
2100
|
+
}, /* @__PURE__ */ React42.createElement(BlockNumberTextField, {
|
|
1919
2101
|
errorMessage: blockRangeError?.message,
|
|
1920
2102
|
label: "Not Before",
|
|
1921
2103
|
name: "nbf",
|
|
1922
2104
|
onBlockNumberChanged: setNbf,
|
|
1923
2105
|
required: true,
|
|
1924
2106
|
size: "small"
|
|
1925
|
-
})), /* @__PURE__ */
|
|
2107
|
+
})), /* @__PURE__ */ React42.createElement(Button5, {
|
|
1926
2108
|
disabled: !intentPayload,
|
|
1927
2109
|
variant: "contained",
|
|
1928
2110
|
onClick: onBuildLocal
|
|
@@ -1930,29 +2112,29 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
1930
2112
|
}, "ProducerIntentBuilderForm");
|
|
1931
2113
|
|
|
1932
2114
|
// src/components/payload/builder/transfer/Flexbox.tsx
|
|
1933
|
-
import
|
|
2115
|
+
import React45 from "react";
|
|
1934
2116
|
|
|
1935
2117
|
// src/components/payload/builder/transfer/Form.tsx
|
|
1936
2118
|
import { Button as Button6, FormControl as FormControl7 } from "@mui/material";
|
|
1937
2119
|
import { isAddress as isAddress4 } from "@xylabs/hex";
|
|
1938
2120
|
import { TransferSchema } from "@xyo-network/xl1-protocol";
|
|
1939
|
-
import
|
|
2121
|
+
import React44, { useMemo as useMemo18, useState as useState19 } from "react";
|
|
1940
2122
|
|
|
1941
2123
|
// src/components/payload/builder/transfer/builder/SingleFlexbox.tsx
|
|
1942
2124
|
import { RemoveCircle } from "@mui/icons-material";
|
|
1943
2125
|
import { FormControl as FormControl6, Icon as Icon3, IconButton as IconButton5 } from "@mui/material";
|
|
1944
|
-
import { isAddress as isAddress3, toHex as
|
|
2126
|
+
import { isAddress as isAddress3, toHex as toHex4 } from "@xylabs/hex";
|
|
1945
2127
|
import { FlexRow as FlexRow7 } from "@xylabs/react-flexbox";
|
|
1946
2128
|
import { BigIntInput } from "@xyo-network/react-shared";
|
|
1947
|
-
import
|
|
2129
|
+
import React43, { useEffect as useEffect3, useMemo as useMemo17, useState as useState18 } from "react";
|
|
1948
2130
|
var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated, onRemoveTransfer, singleTransfer, ...props }) => {
|
|
1949
2131
|
const [toAddress3, setToAddress] = useState18();
|
|
1950
2132
|
const [amount, setAmount] = useState18();
|
|
1951
|
-
const transferAmount =
|
|
2133
|
+
const transferAmount = useMemo17(() => {
|
|
1952
2134
|
if (isAddress3(toAddress3) && amount !== void 0) {
|
|
1953
2135
|
return {
|
|
1954
2136
|
...singleTransfer,
|
|
1955
|
-
amount:
|
|
2137
|
+
amount: toHex4(amount),
|
|
1956
2138
|
to: toAddress3
|
|
1957
2139
|
};
|
|
1958
2140
|
}
|
|
@@ -1965,36 +2147,36 @@ var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated,
|
|
|
1965
2147
|
}, [
|
|
1966
2148
|
transferAmount
|
|
1967
2149
|
]);
|
|
1968
|
-
return /* @__PURE__ */
|
|
2150
|
+
return /* @__PURE__ */ React43.createElement(FlexRow7, {
|
|
1969
2151
|
alignItems: "start",
|
|
1970
2152
|
gap: 1,
|
|
1971
2153
|
...props
|
|
1972
|
-
}, /* @__PURE__ */
|
|
2154
|
+
}, /* @__PURE__ */ React43.createElement(FormControl6, {
|
|
1973
2155
|
fullWidth: true
|
|
1974
|
-
}, /* @__PURE__ */
|
|
2156
|
+
}, /* @__PURE__ */ React43.createElement(XyoAddressTextField, {
|
|
1975
2157
|
label: "To",
|
|
1976
2158
|
name: "to",
|
|
1977
2159
|
onAddressChanged: setToAddress,
|
|
1978
2160
|
required: true,
|
|
1979
2161
|
size: "small"
|
|
1980
|
-
})), /* @__PURE__ */
|
|
2162
|
+
})), /* @__PURE__ */ React43.createElement(FormControl6, {
|
|
1981
2163
|
fullWidth: true
|
|
1982
|
-
}, /* @__PURE__ */
|
|
2164
|
+
}, /* @__PURE__ */ React43.createElement(BigIntInput.TextField, {
|
|
1983
2165
|
label: "Amount",
|
|
1984
2166
|
name: "amount",
|
|
1985
2167
|
onChangeFixedPoint: setAmount,
|
|
1986
2168
|
required: true,
|
|
1987
2169
|
size: "small"
|
|
1988
|
-
})), /* @__PURE__ */
|
|
2170
|
+
})), /* @__PURE__ */ React43.createElement(IconButton5, {
|
|
1989
2171
|
onClick: /* @__PURE__ */ __name(() => onRemoveTransfer?.(singleTransfer.transferId), "onClick")
|
|
1990
|
-
}, /* @__PURE__ */
|
|
2172
|
+
}, /* @__PURE__ */ React43.createElement(Icon3, null, /* @__PURE__ */ React43.createElement(RemoveCircle, null))));
|
|
1991
2173
|
}, "SingleTransferBuilderFlexbox");
|
|
1992
2174
|
|
|
1993
2175
|
// src/components/payload/builder/transfer/Form.tsx
|
|
1994
2176
|
var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
1995
2177
|
const [fromAddress, setFromAddress] = useState19();
|
|
1996
2178
|
const [transfers, setTransfers] = useState19([]);
|
|
1997
|
-
const transferPayload =
|
|
2179
|
+
const transferPayload = useMemo18(() => {
|
|
1998
2180
|
if (isAddress4(fromAddress) && transfers.length > 0) {
|
|
1999
2181
|
const transfersRecord = {};
|
|
2000
2182
|
for (const transfer of transfers) {
|
|
@@ -2036,19 +2218,19 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
2036
2218
|
return transfer;
|
|
2037
2219
|
}));
|
|
2038
2220
|
}, "onTransferUpdated");
|
|
2039
|
-
return /* @__PURE__ */
|
|
2221
|
+
return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(FormControl7, {
|
|
2040
2222
|
fullWidth: true
|
|
2041
|
-
}, /* @__PURE__ */
|
|
2223
|
+
}, /* @__PURE__ */ React44.createElement(XyoAddressTextField, {
|
|
2042
2224
|
label: "From",
|
|
2043
2225
|
name: "from",
|
|
2044
2226
|
onAddressChanged: setFromAddress,
|
|
2045
2227
|
required: true,
|
|
2046
2228
|
size: "small"
|
|
2047
|
-
})), /* @__PURE__ */
|
|
2229
|
+
})), /* @__PURE__ */ React44.createElement(Button6, {
|
|
2048
2230
|
onClick: onTransferAdded,
|
|
2049
2231
|
size: "small",
|
|
2050
2232
|
variant: "contained"
|
|
2051
|
-
}, "Add Transfer"), transfers.map((transfer) => /* @__PURE__ */
|
|
2233
|
+
}, "Add Transfer"), transfers.map((transfer) => /* @__PURE__ */ React44.createElement(SingleTransferBuilderFlexbox, {
|
|
2052
2234
|
key: transfer.transferId,
|
|
2053
2235
|
onTransferUpdated,
|
|
2054
2236
|
onRemoveTransfer: onTransferRemoved,
|
|
@@ -2056,7 +2238,7 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
2056
2238
|
sx: {
|
|
2057
2239
|
width: "100%"
|
|
2058
2240
|
}
|
|
2059
|
-
})), /* @__PURE__ */
|
|
2241
|
+
})), /* @__PURE__ */ React44.createElement(Button6, {
|
|
2060
2242
|
disabled: !transferPayload,
|
|
2061
2243
|
variant: "contained",
|
|
2062
2244
|
onClick: onBuildLocal
|
|
@@ -2064,7 +2246,7 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
2064
2246
|
}, "TransferBuilderForm");
|
|
2065
2247
|
|
|
2066
2248
|
// src/components/payload/builder/transfer/Flexbox.tsx
|
|
2067
|
-
var TransferBuilderFlexbox = /* @__PURE__ */ __name(({ onBuild, ...props }) => /* @__PURE__ */
|
|
2249
|
+
var TransferBuilderFlexbox = /* @__PURE__ */ __name(({ onBuild, ...props }) => /* @__PURE__ */ React45.createElement(PayloadBuilderFlexbox, {
|
|
2068
2250
|
gap: 4,
|
|
2069
2251
|
alignItems: "start",
|
|
2070
2252
|
BuilderComponent: TransferBuilderForm,
|
|
@@ -2079,7 +2261,7 @@ import { MemoryArchivist } from "@xyo-network/archivist-memory";
|
|
|
2079
2261
|
import { ArchivistConfigSchema } from "@xyo-network/archivist-model";
|
|
2080
2262
|
import { buildRandomBlockChain } from "@xyo-network/react-chain-shared";
|
|
2081
2263
|
import { flattenHydratedBlocks } from "@xyo-network/xl1-protocol-sdk";
|
|
2082
|
-
import
|
|
2264
|
+
import React46, { useEffect as useEffect4 } from "react";
|
|
2083
2265
|
|
|
2084
2266
|
// src/lib/getChainArchivist.ts
|
|
2085
2267
|
import { assertEx as assertEx4 } from "@xylabs/assert";
|
|
@@ -2148,7 +2330,7 @@ var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, { args, ...context
|
|
|
2148
2330
|
}
|
|
2149
2331
|
}
|
|
2150
2332
|
};
|
|
2151
|
-
return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */
|
|
2333
|
+
return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */ React46.createElement(Story, props) : /* @__PURE__ */ React46.createElement(CircularProgress, null);
|
|
2152
2334
|
}, "ChainArchivistDecorator");
|
|
2153
2335
|
|
|
2154
2336
|
// src/stories/ChainArchivistDelayedInsertDecorator.tsx
|
|
@@ -2159,7 +2341,7 @@ import { MemoryArchivist as MemoryArchivist2 } from "@xyo-network/archivist-memo
|
|
|
2159
2341
|
import { ArchivistConfigSchema as ArchivistConfigSchema2 } from "@xyo-network/archivist-model";
|
|
2160
2342
|
import { buildRandomBlockChain as buildRandomBlockChain2 } from "@xyo-network/react-chain-shared";
|
|
2161
2343
|
import { flattenHydratedBlock } from "@xyo-network/xl1-protocol-sdk";
|
|
2162
|
-
import
|
|
2344
|
+
import React47, { useEffect as useEffect5, useState as useState20 } from "react";
|
|
2163
2345
|
var chainArchivistRef;
|
|
2164
2346
|
var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
2165
2347
|
const [firstBlock, setFirstBlock] = useState20();
|
|
@@ -2217,18 +2399,18 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
|
|
|
2217
2399
|
}
|
|
2218
2400
|
}
|
|
2219
2401
|
};
|
|
2220
|
-
return firstBlock ? /* @__PURE__ */
|
|
2402
|
+
return firstBlock ? /* @__PURE__ */ React47.createElement(Story, props) : /* @__PURE__ */ React47.createElement(CircularProgress2, null);
|
|
2221
2403
|
}, "ChainArchivistDelayedInsertDecorator");
|
|
2222
2404
|
|
|
2223
2405
|
// src/stories/ChainInfoContextDecorator.tsx
|
|
2224
2406
|
import { assertEx as assertEx5 } from "@xylabs/assert";
|
|
2225
2407
|
import { usePromise as usePromise7 } from "@xylabs/react-promise";
|
|
2226
|
-
import { isDefined as
|
|
2408
|
+
import { isDefined as isDefined7 } from "@xylabs/typeof";
|
|
2227
2409
|
import { ChainBlockNumberIterationService as ChainBlockNumberIterationService3 } from "@xyo-network/chain-services";
|
|
2228
2410
|
import { findFirstMatching } from "@xyo-network/chain-utils";
|
|
2229
2411
|
import { isBlockBoundWitness as isBlockBoundWitness3 } from "@xyo-network/xl1-protocol";
|
|
2230
2412
|
import { readPayloadMapFromStore } from "@xyo-network/xl1-protocol-sdk";
|
|
2231
|
-
import
|
|
2413
|
+
import React48 from "react";
|
|
2232
2414
|
var archivistConfig = {
|
|
2233
2415
|
url: "http://localhost:8080",
|
|
2234
2416
|
chainArchivistModuleId: "XYOPublic:XYOChain:Chain"
|
|
@@ -2242,7 +2424,7 @@ var ChainInfoContextDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
|
2242
2424
|
return await getChainArchivistFromBridge(archivistConfig);
|
|
2243
2425
|
}, []);
|
|
2244
2426
|
const [chainIterator] = usePromise7(async () => {
|
|
2245
|
-
if (
|
|
2427
|
+
if (isDefined7(chainArchivist) && isDefined7(chainId)) {
|
|
2246
2428
|
const firstMatch = assertEx5(await findFirstMatching(chainArchivist), () => `No head found in archivist: ${chainArchivist.id} `);
|
|
2247
2429
|
const head = assertEx5(isBlockBoundWitness3(firstMatch) ? firstMatch : void 0, () => `Expected a block bound witness: ${JSON.stringify(firstMatch)}`);
|
|
2248
2430
|
const chainMap = readPayloadMapFromStore(chainArchivist);
|
|
@@ -2255,13 +2437,17 @@ var ChainInfoContextDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
|
2255
2437
|
chainArchivist,
|
|
2256
2438
|
chainId
|
|
2257
2439
|
]);
|
|
2258
|
-
return /* @__PURE__ */
|
|
2440
|
+
return /* @__PURE__ */ React48.createElement(ChainInfoProvider, {
|
|
2259
2441
|
chainArchivist,
|
|
2260
2442
|
chainId,
|
|
2261
2443
|
chainIterator
|
|
2262
|
-
}, /* @__PURE__ */
|
|
2444
|
+
}, /* @__PURE__ */ React48.createElement(Story, context));
|
|
2263
2445
|
}, "ChainInfoContextDecorator");
|
|
2264
2446
|
export {
|
|
2447
|
+
AccountBalanceHistoryFlexBox,
|
|
2448
|
+
AccountBalanceHistoryTable,
|
|
2449
|
+
AddressTableCell,
|
|
2450
|
+
BalanceHistoryTableRow,
|
|
2265
2451
|
BlockAddressChip,
|
|
2266
2452
|
BlockChainPagination,
|
|
2267
2453
|
BlockChainTableRow,
|
|
@@ -2300,6 +2486,7 @@ export {
|
|
|
2300
2486
|
StaticBlockchainRenderFlexBox,
|
|
2301
2487
|
StyledPulseSvgIcon,
|
|
2302
2488
|
SubmitChainTransaction,
|
|
2489
|
+
TableHeadingLabels,
|
|
2303
2490
|
TransactionCountChip,
|
|
2304
2491
|
TransactionsDialog,
|
|
2305
2492
|
TransactionsQuickTipButton,
|