Skip to content

Commit

Permalink
chore: bring back objectSpread
Browse files Browse the repository at this point in the history
  • Loading branch information
rossbulat committed Nov 4, 2024
1 parent 1de7a8c commit fe70bb1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hooks/useBuildPayload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit fe70bb1

Please sign in to comment.