Skip to content

Commit 5303d25

Browse files
baymacljttl3q04t
andauthored
add collateral only when using plutus (#3)
* add collateral only when using plutus * update check isUsingPlutus --------- Co-authored-by: tony <[email protected]>
1 parent 7af6dc8 commit 5303d25

File tree

1 file changed

+2
-2
lines changed
  • packages/translucent/src/translucent

1 file changed

+2
-2
lines changed

packages/translucent/src/translucent/tx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,8 @@ export class Tx {
840840
);
841841
}
842842
this.txBuilder.select_utxos(2);
843-
844-
{
843+
const isUsingPlutus = Object.keys(this.scripts).length > 0;
844+
if (isUsingPlutus) {
845845
let foundUtxo = walletUTxOs.find(
846846
(x) =>
847847
BigInt(x.output().amount().coin().to_str()) >=

0 commit comments

Comments
 (0)