From fe70bb17b3d3b613aa577a9f19c0925e3e2d0507 Mon Sep 17 00:00:00 2001 From: Ross Bulat Date: Mon, 4 Nov 2024 15:32:51 +0700 Subject: [PATCH] chore: bring back objectSpread --- src/hooks/useBuildPayload/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hooks/useBuildPayload/index.tsx b/src/hooks/useBuildPayload/index.tsx index 259f682a25..dba77380f6 100644 --- a/src/hooks/useBuildPayload/index.tsx +++ b/src/hooks/useBuildPayload/index.tsx @@ -3,7 +3,7 @@ import { merkleizeMetadata } from '@polkadot-api/merkleize-metadata'; import type { ApiPromise } from '@polkadot/api'; -import { u8aToHex } from '@polkadot/util'; +import { u8aToHex, objectSpread } from '@polkadot/util'; import type { AnyJson } from '@w3ux/types'; import { useApi } from 'contexts/Api'; import { useBalances } from 'contexts/Balances'; @@ -32,12 +32,11 @@ export const useBuildPayload = () => { const merkleizedMetadata = merkleizeMetadata(metadata.toHex(), opts); const metadataHash = u8aToHex(merkleizedMetadata.digest()); - const payload = { - ...p, + const payload = objectSpread({}, p, { metadataHash, mode: 1, withSignedTransaction: true, - }; + }); const newPayload = a.registry.createType('ExtrinsicPayload', payload); return {