Skip to content

Commit b1a7f4d

Browse files
committed
fixup! feat(tx-construction): add customizeCb to GenericTxBuilder
1 parent ec76f62 commit b1a7f4d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/tx-construction/src/createTransactionInternals.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ export const createPreInputSelectionTxBody = ({
4545
});
4646

4747
/** Updates the txBody after input selection takes place with the calculated change and selected inputs */
48-
export const includeChangeAndInputs = async ({
48+
export const includeChangeAndInputs = ({
4949
bodyPreInputSelection,
5050
inputSelection
5151
}: Pick<CreateTxInternalsProps, 'inputSelection'> & {
5252
bodyPreInputSelection: TxBodyPreInputSelection;
53-
}): Promise<Cardano.TxBodyWithHash> => {
53+
}): Cardano.TxBodyWithHash => {
5454
const body: Cardano.TxBody = {
5555
...bodyPreInputSelection,
5656
fee: inputSelection.fee,
@@ -67,7 +67,7 @@ export const includeChangeAndInputs = async ({
6767
};
6868
};
6969

70-
export const createTransactionInternals = async (props: CreateTxInternalsProps): Promise<Cardano.TxBodyWithHash> => {
70+
export const createTransactionInternals = (props: CreateTxInternalsProps): Cardano.TxBodyWithHash => {
7171
const { body } = createPreInputSelectionTxBody({ ...props });
7272
return includeChangeAndInputs({ bodyPreInputSelection: body, inputSelection: props.inputSelection });
7373
};

packages/tx-construction/src/tx-builder/initializeTx.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const initializeTx = async (
6161
if (bodyPreInputSelection.withdrawals?.length) {
6262
logger.debug('Adding rewards withdrawal in the transaction', bodyPreInputSelection.withdrawals);
6363
}
64-
const unsignedTx = await includeChangeAndInputs({
64+
const unsignedTx = includeChangeAndInputs({
6565
bodyPreInputSelection,
6666
inputSelection
6767
});
@@ -98,7 +98,7 @@ export const initializeTx = async (
9898
utxo: new Set(utxo)
9999
});
100100

101-
const { body, hash } = await includeChangeAndInputs({
101+
const { body, hash } = includeChangeAndInputs({
102102
bodyPreInputSelection,
103103
inputSelection
104104
});

packages/tx-construction/test/createTransactionInternals.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('createTransactionInternals', () => {
3838
});
3939
const ledgerTip = await provider.ledgerTip();
4040
const overrides = props(result.selection);
41-
return await createTransactionInternals({
41+
return createTransactionInternals({
4242
validityInterval: {
4343
invalidHereafter: Cardano.Slot(ledgerTip.slot + 3600)
4444
},

0 commit comments

Comments
 (0)