diff --git a/ironfish-cli/src/commands/mempool/status.ts b/ironfish-cli/src/commands/mempool/status.ts index 14bb320e1d..06067158c4 100644 --- a/ironfish-cli/src/commands/mempool/status.ts +++ b/ironfish-cli/src/commands/mempool/status.ts @@ -6,14 +6,16 @@ import { GetMempoolStatusResponse } from '@ironfish/sdk' import { Flags } from '@oclif/core' import blessed from 'blessed' import { IronfishCommand } from '../../command' -import { RemoteFlags } from '../../flags' +import { JsonFlags, RemoteFlags } from '../../flags' import * as ui from '../../ui' export default class Status extends IronfishCommand { - static description = 'Show the status of the Mempool' + static description = "show the mempool's status" + static enableJsonFlag = true static flags = { ...RemoteFlags, + ...JsonFlags, follow: Flags.boolean({ char: 'f', default: false, @@ -21,14 +23,15 @@ export default class Status extends IronfishCommand { }), } - async start(): Promise { + async start(): Promise { const { flags } = await this.parse(Status) if (!flags.follow) { const client = await this.connectRpc() const response = await client.mempool.getMempoolStatus() this.log(renderStatus(response.content)) - this.exit(0) + + return response.content } // Console log will create display issues with Blessed diff --git a/ironfish-cli/src/commands/mempool/transactions.ts b/ironfish-cli/src/commands/mempool/transactions.ts index a2d82b5829..70f3878cea 100644 --- a/ironfish-cli/src/commands/mempool/transactions.ts +++ b/ironfish-cli/src/commands/mempool/transactions.ts @@ -31,7 +31,7 @@ const parseMinMax = (input: string): MinMax | undefined => { } export class TransactionsCommand extends IronfishCommand { - static description = `List transactions in the mempool` + static description = `list mempool transactions` static flags = { ...RemoteFlags,