Skip to content

Commit

Permalink
fix: don't accept --networkId in commands where node is required
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Apr 9, 2024
1 parent df67561 commit cfd7ac5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/commands/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ addCommonOptions(program
return { amount: coinAmountParser(amount) };
},
)
.addOption(networkIdOption)
.option('--payload [payload]', 'Transaction payload.', '')
.addOption(feeOption)
.addOption(ttlOption(true))
Expand Down
3 changes: 0 additions & 3 deletions src/commands/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
forceOption,
passwordOption,
ttlOption,
networkIdOption,
} from '../arguments.js';

const callArgs = new Argument('[args]', 'JSON-encoded arguments array of contract call')
Expand Down Expand Up @@ -105,7 +104,6 @@ addCommonOptions(program
.addOption(contractSourceFilenameOption)
.addOption(contractAciFilenameOption)
.option('-W, --no-waitMined', 'Force waiting until transaction will be mined')
.addOption(networkIdOption)
.addOption(passwordOption)
.addOption(gasOption)
.option('-s, --callStatic', 'Call static')
Expand Down Expand Up @@ -133,7 +131,6 @@ addCommonOptions(program
.addOption(contractSourceFilenameOption)
.option('--contractBytecode [contractBytecode]', 'Contract bytecode file name')
.addOption(contractAciFilenameOption)
.addOption(networkIdOption)
.option('-W, --no-waitMined', 'Force waiting until transaction will be mined')
.addOption(passwordOption)
.addOption(gasOption)
Expand Down
5 changes: 2 additions & 3 deletions src/commands/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Command } from 'commander';
import { NAME_TTL, CLIENT_TTL } from '@aeternity/aepp-sdk';
import * as AENS from '../actions/aens.js';
import {
nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, networkIdOption,
nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption,
} from '../arguments.js';

const program = new Command().name('aecli name');
Expand All @@ -20,7 +20,6 @@ const addCommonOptions = (p) => p
.addOption(feeOption)
.option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with')
.addOption(passwordOption)
.addOption(networkIdOption)
.addOption(forceOption)
.addOption(jsonOption);

Expand Down Expand Up @@ -121,7 +120,7 @@ addCommonOptions(program
//
// Example: `aecli name revoke ./myWalletKeyFile --password testpass testname.chain`
addCommonOptions(program
.command('revoke <wallet_path> <name>')
.command('revoke <wallet_path> <name>')
.option('-M, --no-waitMined', 'Do not wait until transaction will be mined')
.description('Revoke an AENS name')
.action(AENS.revokeName));
Expand Down
5 changes: 2 additions & 3 deletions src/commands/oracle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Command } from 'commander';
import { ORACLE_TTL, QUERY_TTL, RESPONSE_TTL } from '@aeternity/aepp-sdk';
import * as Oracle from '../actions/oracle.js';
import {
nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption, networkIdOption,
nodeOption, jsonOption, feeOption, forceOption, passwordOption, ttlOption,
} from '../arguments.js';

const program = new Command().name('aecli oracle');
Expand All @@ -18,7 +18,6 @@ const addCommonOptions = (p) => p
.addOption(feeOption)
.option('--nonce [nonce]', 'Override the nonce that the transaction is going to be sent with')
.addOption(passwordOption)
.addOption(networkIdOption)
.addOption(forceOption)
.addOption(jsonOption);

Expand Down Expand Up @@ -85,7 +84,7 @@ addCommonOptions(program
.command('respond-query <wallet_path> <oracleId> <queryId> <response>')
.option('-M, --no-waitMined', 'Do not wait until transaction will be mined')
.option('--responseTtl [responseTtl]', 'Query response time to leave', RESPONSE_TTL.value)
.description('Respond to Oracle Query')
.description('Respond to Oracle Query')
.action(Oracle.respondToQuery));

// ## Initialize `get oracle` command
Expand Down

0 comments on commit cfd7ac5

Please sign in to comment.