Skip to content

Commit

Permalink
fix(input-selection): manage txOut and BigNumu in computeMinimumCoinQ…
Browse files Browse the repository at this point in the history
…uantity
  • Loading branch information
mkazlauskas authored and mirceahasegan committed Nov 23, 2022
1 parent a296397 commit 487bb7f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/input-selection/src/selectionConstraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ export const computeMinimumCoinQuantity =
(output) =>
usingAutoFree((scope) =>
BigInt(
CML.min_ada_required(
coreToCml.txOut(scope, output),
scope.manage(CML.BigNum.from_str(coinsPerUtxoByte.toString()))
).to_str()
scope
.manage(
CML.min_ada_required(
scope.manage(coreToCml.txOut(scope, output)),
scope.manage(CML.BigNum.from_str(coinsPerUtxoByte.toString()))
)
)
.to_str()
)
);

Expand Down

0 comments on commit 487bb7f

Please sign in to comment.