Skip to content

Commit

Permalink
add default account label to account list
Browse files Browse the repository at this point in the history
  • Loading branch information
jowparks committed Oct 28, 2024
1 parent 7513b1a commit f5004d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ironfish-cli/src/commands/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ export class AccountsCommand extends IronfishCommand {
return []
}

const defaultAccount = await client.wallet.getDefaultAccount()
const defaultName = defaultAccount.content.account?.name

ui.table(
response.content.accounts,
{
name: {
get: (row) => row.name,
get: (row) => (row.name === defaultName ? `${row.name} (default)` : row.name),
header: 'Account',
minWidth: 11,
},
Expand Down

0 comments on commit f5004d0

Please sign in to comment.