Skip to content

Commit

Permalink
Add --json support to chain:transactions:info cmd (#5189)
Browse files Browse the repository at this point in the history
  • Loading branch information
NullSoldier authored Jul 30, 2024
1 parent d406695 commit 79fbe89
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ironfish-cli/src/commands/chain/transactions/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
import { CurrencyUtils, FileUtils } from '@ironfish/sdk'
import { Args } from '@oclif/core'
import { IronfishCommand } from '../../../command'
import { RemoteFlags } from '../../../flags'
import { ColorFlag, ColorFlagKey, RemoteFlags } from '../../../flags'
import * as ui from '../../../ui'

export class TransactionInfo extends IronfishCommand {
static description = 'show transaction information'
static enableJsonFlag = true

static flags = {
...RemoteFlags,
[ColorFlagKey]: ColorFlag,
}

static args = {
Expand All @@ -22,7 +24,7 @@ export class TransactionInfo extends IronfishCommand {
}),
}

async start(): Promise<void> {
async start(): Promise<unknown> {
const { args } = await this.parse(TransactionInfo)

const client = await this.connectRpc()
Expand All @@ -46,5 +48,7 @@ export class TransactionInfo extends IronfishCommand {
'Burn count': transaction.burns.length,
}),
)

return transaction
}
}

0 comments on commit 79fbe89

Please sign in to comment.