Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
micahkendall committed Sep 5, 2024
1 parent 5ab434e commit e73950f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/blaze-tx/src/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1263,9 +1263,17 @@ export class TxBuilder {
// Gather all inputs from the transaction body.
const inputs = [...this.body.inputs().values()];
// Perform initial checks and preparations for coin selection.
const preliminaryDraftTx = new Transaction(this.body, new TransactionWitnessSet());
const preliminaryFee = this.params.minFeeConstant + fromHex(preliminaryDraftTx.toCbor()).length * this.params.minFeeCoefficient;
let excessValue = this.getPitch(bigintMax(BigInt(Math.ceil(preliminaryFee)), this.minimumFee));
const preliminaryDraftTx = new Transaction(
this.body,
new TransactionWitnessSet(),
);
const preliminaryFee =
this.params.minFeeConstant +
fromHex(preliminaryDraftTx.toCbor()).length *
this.params.minFeeCoefficient;
let excessValue = this.getPitch(
bigintMax(BigInt(Math.ceil(preliminaryFee)), this.minimumFee),
);
let spareInputs: TransactionUnspentOutput[] = [];
for (const [utxo] of this.utxos.entries()) {
if (!inputs.includes(utxo.input())) {
Expand Down

0 comments on commit e73950f

Please sign in to comment.