From 28e5337f54047ba7bf017ca2fb0bc73038d7e74f Mon Sep 17 00:00:00 2001 From: Jan Mazak Date: Mon, 16 Jan 2023 11:42:15 +0100 Subject: [PATCH] fix: avoid duplication of hwsfiles in arguments --- src/commandExecutor.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commandExecutor.ts b/src/commandExecutor.ts index 5972efe6..65fbbe8a 100644 --- a/src/commandExecutor.ts +++ b/src/commandExecutor.ts @@ -212,7 +212,10 @@ const CommandExecutor = async () => { const createGovernanceVotingRegistrationMetadata = async ( args: ParsedGovernanceVotingKeyRegistrationMetadataArguments, ) => { - if (!areHwSigningDataNonByron([...args.rewardAddressSigningKeyData, args.hwStakeSigningFileData])) { + // adds stake signing data to reward address data so that it is not necessary to repeat the same + // staking key file in command line arguments + const hwSigningData = [...args.rewardAddressSigningKeyData, args.hwStakeSigningFileData] + if (!areHwSigningDataNonByron(hwSigningData)) { throw Error(Errors.ByronSigningFilesFoundInVotingRegistration) } @@ -241,7 +244,7 @@ const CommandExecutor = async () => { args.nonce, votingPurpose, args.network, - args.rewardAddressSigningKeyData, + hwSigningData, args.derivationType, )