Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
networkIdentifier: networkIdentifierSource,
passphrase: passphraseSource,
'second-passphrase': secondPassphraseSource,
'no-signature': noSignature,
data: dataString,
},
} = this.parse(TransferCommand);
const { amount, address }: Args = args;
const networkIdentifier = getNetworkIdentifierWithInput(
networkIdentifierSource,
this.userConfig.api.network,
);
validateAddress(address);
const normalizedAmount = transactionUtils.convertLSKToBeddows(amount);
const processFunction = processInputs(
networkIdentifier,
normalizedAmount,
address,
dataString,
);
if (noSignature) {
const noSignatureResult = processFunction({
passphrase: undefined,
secondPassphrase: undefined,
});
this.print(noSignatureResult);
return;
getTransactions: async ({ networkConfig }, {
dateFrom, dateTo, amountFrom, amountTo, ...searchParams
}) => liskServiceGet({
networkConfig,
path: '/api/v1/transactions',
transformResponse: response => response.data,
searchParams: {
limit: DEFAULT_LIMIT,
...(dateFrom && { from: formatDate(dateFrom) }),
...(dateTo && { to: formatDate(dateTo, { inclusive: true }) }),
...(amountFrom && { min: utils.convertLSKToBeddows(amountFrom) }),
...(amountTo && { max: utils.convertLSKToBeddows(amountTo) }),
...searchParams,
},
}),
getTransactions: async ({ networkConfig }, {
dateFrom, dateTo, amountFrom, amountTo, ...searchParams
}) => liskServiceGet({
networkConfig,
path: '/api/v1/transactions',
transformResponse: response => response.data,
searchParams: {
limit: DEFAULT_LIMIT,
...(dateFrom && { from: formatDate(dateFrom) }),
...(dateTo && { to: formatDate(dateTo, { inclusive: true }) }),
...(amountFrom && { min: utils.convertLSKToBeddows(amountFrom) }),
...(amountTo && { max: utils.convertLSKToBeddows(amountTo) }),
...searchParams,
},
}),