@xyo-network/react-chain-blockchain 1.3.17 → 1.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.mjs +8 -6
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/transactions/TransactionsQuickTipButton.d.ts.map +1 -1
- package/dist/types/helpers/txsFromBlock.d.ts +2 -8
- package/dist/types/helpers/txsFromBlock.d.ts.map +1 -1
- package/dist/types/hooks/useTxsFromBlock.d.ts +1 -7
- package/dist/types/hooks/useTxsFromBlock.d.ts.map +1 -1
- package/package.json +30 -29
- package/src/components/transactions/TransactionsQuickTipButton.tsx +2 -1
- package/src/helpers/txsFromBlock.ts +6 -4
package/dist/browser/index.mjs
CHANGED
|
@@ -587,11 +587,13 @@ var useIterateChain = /* @__PURE__ */ __name((chainIteratorParams, maxDepth) =>
|
|
|
587
587
|
import { usePromise as usePromise4 } from "@xylabs/react-promise";
|
|
588
588
|
|
|
589
589
|
// src/helpers/txsFromBlock.ts
|
|
590
|
+
import { SignedHydratedBlockWrapper } from "@xyo-network/chain-wrappers";
|
|
590
591
|
import { PayloadBuilder as PayloadBuilder4 } from "@xyo-network/payload-builder";
|
|
591
|
-
import { isTransactionBoundWitness } from "@xyo-network/xl1-protocol";
|
|
592
592
|
var txsFromBlock = /* @__PURE__ */ __name(async (block) => {
|
|
593
|
-
const
|
|
594
|
-
|
|
593
|
+
const wrapper = await SignedHydratedBlockWrapper.parse(block);
|
|
594
|
+
const txs = wrapper.transactions;
|
|
595
|
+
const txPayloads = txs.map((tx) => tx.boundWitness);
|
|
596
|
+
return await PayloadBuilder4.hashPairs(txPayloads);
|
|
595
597
|
}, "txsFromBlock");
|
|
596
598
|
|
|
597
599
|
// src/hooks/useTxsFromBlock.ts
|
|
@@ -649,7 +651,7 @@ var TransactionsQuickTipButton = /* @__PURE__ */ __name(({ block, ...props }) =>
|
|
|
649
651
|
textOverflow: "ellipsis",
|
|
650
652
|
whiteSpace: "nowrap"
|
|
651
653
|
}
|
|
652
|
-
},
|
|
654
|
+
}, hash)), /* @__PURE__ */ React8.createElement(FlexRow, null, /* @__PURE__ */ React8.createElement(Collapse, {
|
|
653
655
|
in: copied,
|
|
654
656
|
unmountOnExit: true
|
|
655
657
|
}, /* @__PURE__ */ React8.createElement(Alert2, null, /* @__PURE__ */ React8.createElement(AlertTitle, null, "Previous hash copied to clipboard")))))))), /* @__PURE__ */ React8.createElement(Snackbar, {
|
|
@@ -729,10 +731,10 @@ var buildBlockChainRenderComponent = /* @__PURE__ */ __name(async (BlockComponen
|
|
|
729
731
|
|
|
730
732
|
// src/components/block/helpers/payloadCountsFromBlock.ts
|
|
731
733
|
import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
|
|
732
|
-
import { isTransactionBoundWitness
|
|
734
|
+
import { isTransactionBoundWitness } from "@xyo-network/xl1-protocol";
|
|
733
735
|
var payloadCountsFromBlock = /* @__PURE__ */ __name(([block, payloads]) => {
|
|
734
736
|
const publicPayloads = block.payload_schemas.filter((schema) => schema !== BoundWitnessSchema);
|
|
735
|
-
const transactionHashes = payloads.filter((payload) =>
|
|
737
|
+
const transactionHashes = payloads.filter((payload) => isTransactionBoundWitness(payload)).flatMap((payload) => payload.payload_hashes);
|
|
736
738
|
const privateHashes = transactionHashes.filter((hash) => !publicPayloads.includes(hash));
|
|
737
739
|
return [
|
|
738
740
|
publicPayloads.length,
|