Skip to content

Commit

Permalink
fix updateBaseAsset cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagaprasadvr committed Mar 4, 2024
1 parent 5319def commit fc6e91d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/cli/src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/groups/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const updateBaseAssetCmd = (c: Command) =>
{
flags: '--enabled <boolean>',
description: 'enabled',
defaultValue: true,
defaultValue: 'true',
},
{
flags: '--oracle-source <string>',
Expand Down

0 comments on commit fc6e91d

Please sign in to comment.