From b60c7367a538d8a9c7aa7a4e985da81f04f832b3 Mon Sep 17 00:00:00 2001 From: Kyle Peacock Date: Wed, 20 Sep 2023 14:47:00 -0700 Subject: [PATCH] Update packages/identity/src/identity/delegation.ts Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com> --- packages/identity/src/identity/delegation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/identity/src/identity/delegation.ts b/packages/identity/src/identity/delegation.ts index a488a7e17..974de0408 100644 --- a/packages/identity/src/identity/delegation.ts +++ b/packages/identity/src/identity/delegation.ts @@ -222,7 +222,7 @@ export class DelegationChain { delegation.delegation.expiration, ); } - if (usedPublicKeys.has(currentPublicKey)) { + if (usedPublicKeys.has(delegation.delegation.pubkey)) { throw new DelegationError('Delegation target cannot be repeated in the chain.'); } usedPublicKeys.add(delegation.delegation.pubkey);