diff --git a/packages/cli/src/actions.ts b/packages/cli/src/actions.ts index fc00af91e..373d0ed2e 100644 --- a/packages/cli/src/actions.ts +++ b/packages/cli/src/actions.ts @@ -183,6 +183,7 @@ export const updateBaseAsset = async (opts: Opts) => { oracleAddress, riskCategory, } = opts; + const enabledArg = enabled === 'true' ? true : false; if (!oraclePrice && !oracleAddress) { throw new Error('Either oraclePrice or oracleAddress must be provided'); } @@ -192,7 +193,7 @@ export const updateBaseAsset = async (opts: Opts) => { try { const { response } = await cvg.protocol().updateBaseAsset({ authority: cvg.rpc().getDefaultFeePayer(), - enabled, + enabled: enabledArg, index, priceOracle: { source: oracleSource, diff --git a/packages/cli/src/groups/protocol.ts b/packages/cli/src/groups/protocol.ts index 8d1464d19..40fddeb8a 100644 --- a/packages/cli/src/groups/protocol.ts +++ b/packages/cli/src/groups/protocol.ts @@ -165,7 +165,7 @@ const updateBaseAssetCmd = (c: Command) => { flags: '--enabled ', description: 'enabled', - defaultValue: true, + defaultValue: 'true', }, { flags: '--oracle-source ',