From 5303d259b0c657fd2cc9993e6ff190c11f1c4f3c Mon Sep 17 00:00:00 2001 From: Parichay Barpanda Date: Thu, 11 Apr 2024 10:06:51 +0530 Subject: [PATCH] add collateral only when using plutus (#3) * add collateral only when using plutus * update check isUsingPlutus --------- Co-authored-by: tony --- packages/translucent/src/translucent/tx.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/translucent/src/translucent/tx.ts b/packages/translucent/src/translucent/tx.ts index 8f9d4c8..8399a63 100644 --- a/packages/translucent/src/translucent/tx.ts +++ b/packages/translucent/src/translucent/tx.ts @@ -840,8 +840,8 @@ export class Tx { ); } this.txBuilder.select_utxos(2); - - { + const isUsingPlutus = Object.keys(this.scripts).length > 0; + if (isUsingPlutus) { let foundUtxo = walletUTxOs.find( (x) => BigInt(x.output().amount().coin().to_str()) >=