Skip to content

Commit

Permalink
coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
ljttl3q04t committed May 29, 2024
1 parent 36cda41 commit f66b860
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/translucent/src/translucent/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -876,17 +876,14 @@ export class Tx {
let params = this.translucent.provider
? await this.translucent.provider.getProtocolParameters()
: PROTOCOL_PARAMETERS_DEFAULT;
let multiAsset = foundUtxo.output().amount().multiasset()
multiAsset = multiAsset ?? C.MultiAsset.new();
let multiAsset = foundUtxo.output().amount().multiasset() ?? C.MultiAsset.new();
amtBuilder = amtBuilder.with_asset_and_min_required_coin(
multiAsset,
C.BigNum.from_str(params.coinsPerUtxoByte.toString()),
);
let amtBuilderResult = amtBuilder.build();
if (multiAsset.len() == 0) {
const collateralCoin = amtBuilderResult.output().amount().coin().to_str();
amtBuilder = amtBuilder.with_coin(
C.BigNum.from_str(collateralCoin)
C.BigNum.from_str(amtBuilder.build().output().amount().coin().to_str())
);
}
const collateralReturn = amtBuilder.build().output();
Expand Down

0 comments on commit f66b860

Please sign in to comment.