- Setup eslint with husky for precommit lint - Fix existing lint errors - Setup linter CI Reviewed-on: cerc-io/laconic-registry-cli#54 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
17 lines
456 B
TypeScript
17 lines
456 B
TypeScript
import { Arguments } from 'yargs';
|
|
import clean from 'lodash-clean';
|
|
|
|
export const getConnectionInfo = (argv: Arguments, config: any) => {
|
|
const { server, userKey, bondId, txKey, chainId, fees, gas } = argv;
|
|
|
|
const result = {
|
|
...config,
|
|
...clean({ server, userKey, bondId, txKey, chainId }),
|
|
privateKey: txKey || userKey || config.userKey,
|
|
gas: String(gas || config.gas),
|
|
fees: String(fees || config.fees)
|
|
};
|
|
|
|
return result;
|
|
};
|