diff --git a/ironfish-cli/src/commands/wallet/index.ts b/ironfish-cli/src/commands/wallet/index.ts index 92ad0dc869..37f6653122 100644 --- a/ironfish-cli/src/commands/wallet/index.ts +++ b/ironfish-cli/src/commands/wallet/index.ts @@ -44,6 +44,10 @@ export class AccountsCommand extends IronfishCommand { header: 'Account', minWidth: 11, }, + default: { + get: (row) => (row.default ? chalk.green('✓') : ''), + header: 'Default', + }, viewOnly: { get: (row) => (row.viewOnly ? chalk.green('✓') : ''), header: 'View Only', @@ -73,7 +77,6 @@ export class AccountsCommand extends IronfishCommand { { ...flags, printLine: this.log.bind(this), - 'no-header': flags['no-header'] ?? !flags.extended, }, ) diff --git a/ironfish/src/rpc/routes/wallet/serializers.ts b/ironfish/src/rpc/routes/wallet/serializers.ts index bb2c27b627..67ea68bba4 100644 --- a/ironfish/src/rpc/routes/wallet/serializers.ts +++ b/ironfish/src/rpc/routes/wallet/serializers.ts @@ -170,5 +170,6 @@ export async function serializeRpcAccountStatus( : null, scanningEnabled: account.scanningEnabled, viewOnly: !account.isSpendingAccount(), + default: wallet.getDefaultAccount()?.id === account.id, } } diff --git a/ironfish/src/rpc/routes/wallet/types.ts b/ironfish/src/rpc/routes/wallet/types.ts index 33ef60a55b..a692840702 100644 --- a/ironfish/src/rpc/routes/wallet/types.ts +++ b/ironfish/src/rpc/routes/wallet/types.ts @@ -172,6 +172,7 @@ export type RpcAccountStatus = { } | null scanningEnabled: boolean viewOnly: boolean + default: boolean } export const RpcAccountStatusSchema: yup.ObjectSchema = yup @@ -188,5 +189,6 @@ export const RpcAccountStatusSchema: yup.ObjectSchema = yup .defined(), scanningEnabled: yup.boolean().defined(), viewOnly: yup.boolean().defined(), + default: yup.boolean().defined(), }) .defined()