Skip to content

Commit

Permalink
fix(middleware-sdk-transcribe-streaming): validate signer (#2676)
Browse files Browse the repository at this point in the history
  • Loading branch information
markbrouch authored Aug 19, 2021
1 parent 09715c8 commit a937da9
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,4 @@ export const resolveWebSocketConfig = <T>(
},
};

const validateSigner = (signer: any): signer is BaseSignatureV4 =>
// We cannot use instanceof here. Because we might import the wrong SignatureV4
// constructor here as multiple version of packages maybe installed here.
(signer.constructor.toString() as string).indexOf("SignatureV4") >= 0;
const validateSigner = (signer: any): signer is BaseSignatureV4 => !!signer;

0 comments on commit a937da9

Please sign in to comment.