From a940fe50e90f7a2f9f18c609266034341c9a9fed Mon Sep 17 00:00:00 2001 From: neeboo Date: Thu, 18 Aug 2022 14:39:39 +0800 Subject: [PATCH] :bug: fix delegations target array is empty --- packages/connection/src/ic/icAuthClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/connection/src/ic/icAuthClient.ts b/packages/connection/src/ic/icAuthClient.ts index db5898c..7624a1a 100644 --- a/packages/connection/src/ic/icAuthClient.ts +++ b/packages/connection/src/ic/icAuthClient.ts @@ -132,7 +132,7 @@ export class AuthClient { signedDelegation.delegation.expiration, signedDelegation.delegation.targets && signedDelegation.delegation.targets.length > 0 ? signedDelegation.delegation.targets?.map(t => Principal.fromText(t)) - : [], + : undefined, ), signature: signedDelegation.signature.buffer as Signature, }; @@ -153,7 +153,7 @@ export class AuthClient { signedDelegation.delegation.expiration, signedDelegation.delegation.targets && signedDelegation.delegation.targets.length > 0 ? signedDelegation.delegation.targets?.map(t => Principal.fromText(t)) - : [], + : undefined, ), signature: signedDelegation.signature.buffer as Signature, };