From 96ebbff3b11f768a94f24f463dedf59223e2bd2a Mon Sep 17 00:00:00 2001 From: Charles Bergeron Date: Thu, 29 Jun 2023 17:50:35 -0700 Subject: [PATCH] also stash the numberOfTiers in status --- package.json | 2 +- src/commands/compute/drawPrizes.ts | 8 ++------ src/lib/utils/status.ts | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 337a1ed..c2e078a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "PoolTogether V5 Command Line Interface", "author": "PoolTogether Inc", "license": "GPL-3.0-only", - "version": "0.0.1-beta.20", + "version": "0.0.1-beta.21", "repository": "https://github.com/pooltogether/v5-cli", "homepage": "https://github.com/pooltogether/v5-cli", "bugs": "https://github.com/pooltogether/v5-cli/issues", diff --git a/src/commands/compute/drawPrizes.ts b/src/commands/compute/drawPrizes.ts index e86168c..fa399c7 100644 --- a/src/commands/compute/drawPrizes.ts +++ b/src/commands/compute/drawPrizes.ts @@ -21,11 +21,6 @@ import { TierPrizeAmounts, } from "../../lib/utils/prizeAmounts"; -interface TiersContext { - numberOfTiers: number; - rangeArray: number[]; -} - /** * @name DrawPrizes */ @@ -132,7 +127,8 @@ export default class DrawPrizes extends Command { writePrizesToOutput(outDirWithSchema, claimsWithPrizeAmounts); const statusSuccess = updateStatusSuccess(DrawPrizes.statusLoading.createdAt, { - prizeLength: claimsWithPrizeAmounts.length, + numberOfTiers: prizePoolInfo.numberOfTiers, + prizeLength: claims.length, amountsTotal: sumPrizeAmounts(tierPrizeAmounts), tierPrizeAmounts: mapTierPrizeAmountsToString(tierPrizeAmounts), }); diff --git a/src/lib/utils/status.ts b/src/lib/utils/status.ts index f9d40a8..a97143a 100644 --- a/src/lib/utils/status.ts +++ b/src/lib/utils/status.ts @@ -1,6 +1,7 @@ import { Status, StatusError } from '../../types' export interface SuccessStats { + numberOfTiers: number; prizeLength: number; amountsTotal: string; tierPrizeAmounts: any;