Skip to content

Commit

Permalink
fix: avoid duplication of hwsfiles in arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
janmazak committed Feb 7, 2023
1 parent 05353f0 commit 28e5337
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commandExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -241,7 +244,7 @@ const CommandExecutor = async () => {
args.nonce,
votingPurpose,
args.network,
args.rewardAddressSigningKeyData,
hwSigningData,
args.derivationType,
)

Expand Down

0 comments on commit 28e5337

Please sign in to comment.