Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
shamsartem committed Feb 12, 2025
1 parent 04d5ea1 commit d1376da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli/package/src/commands/provider/deal-exit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ export default class DealExit extends BaseCommand<typeof DealExit> {
>[];

const dealWorkerIds = dealIds.map((dealId, i) => {
const deal = contracts.getDealV2(dealId);
const workerIds = workerIdsFromRPC[i] ?? [];
return { dealId, deal, workerIds };
return { dealId, workerIds };
});

for (const { dealId, deal, workerIds } of dealWorkerIds) {
for (const { dealId, workerIds } of dealWorkerIds) {
const deal = contracts.getDealV2(dealId);
const [firstWorkerId, ...restWorkerIds] = workerIds;

if (firstWorkerId === undefined) {
Expand Down

0 comments on commit d1376da

Please sign in to comment.