Skip to content

Commit

Permalink
fix variable mutablility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagaprasadvr committed Sep 27, 2023
1 parent 70e4518 commit ff6b7e1
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,19 @@ export const prepareSettlementAndPrepareMoreLegsOperationHandler: OperationHandl
address: rfq,
});

let { ataTxBuilderArray, prepareSettlementTxBuilder: prepareBuilder } =
await prepareSettlementBuilder(
convergence,
rfqModel,
{
...operation.input,
},
scope
);
const result = await prepareSettlementBuilder(
convergence,
rfqModel,
{
...operation.input,
},
scope
);
scope.throwIfCanceled();

let slicedLegAmount = legAmountToPrepare;
const { ataTxBuilderArray } = result;
let prepareBuilder = result.prepareSettlementTxBuilder;

while (!prepareBuilder.checkTransactionFits()) {
const halvedLegAmount = Math.trunc(slicedLegAmount / 2);
Expand Down

0 comments on commit ff6b7e1

Please sign in to comment.