Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected getSignMethod(signMethod?: SignMethod) {
if (signMethod === undefined) {
signMethod = SignMethod.ETH_SIGN;
}
if ([0, 1, 2].indexOf(signMethod) === -1) {
throw new ConnectorError(ConnectorIssue.SIGNATURE_UNKNOWN, `Unknown signature method ${signMethod}`);
}
return signMethod;
}