Skip to content

Commit

Permalink
set scriptSize of collateral inputs to 0 to bypass fetcher logic
Browse files Browse the repository at this point in the history
  • Loading branch information
twwu123 committed Nov 14, 2024
1 parent a2a7c89 commit 087e9e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/mesh-transaction/src/mesh-tx-builder/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ export class MeshTxBuilder extends MeshTxBuilderCore {
}
this.removeDuplicateInputs();

// We can set scriptSize of collaterals as 0, because the ledger ignores this for fee calculations
for (let collateral of this.meshTxBuilderBody.collaterals) {
collateral.txIn.scriptSize = 0;
}

// Checking if all inputs are complete
const { inputs, collaterals, mints } = this.meshTxBuilderBody;
const incompleteTxIns = [...inputs, ...collaterals].filter(
Expand Down

0 comments on commit 087e9e2

Please sign in to comment.