fix: use 1-indexing for ChainStage #1601

Closed
Sainan wants to merge 3 commits from give-key-chain-message-fix into main
Showing only changes of commit 6598768c87 - Show all commits

View File

@ -143,7 +143,7 @@ export const getKeyChainItems = ({ KeyChain, ChainStage }: IKeyChainRequest): st
throw new Error(`KeyChain ${KeyChain} does not contain chain stages`);
}
const keyChainStage = chainStages[ChainStage];
const keyChainStage = chainStages[ChainStage - 1];
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!keyChainStage) {
throw new Error(`KeyChainStage ${ChainStage} not found`);