Skip to content

Commit 804253f

Browse files
committed
fix lint and tested validateBase64String
1 parent 314d8c9 commit 804253f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/wallet/validationHelpers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,13 @@ function validateOptionalBase64String (
265265
* @returns validated base64 string
266266
* @throws WERR_INVALID_PARAMETER when invalid
267267
*/
268-
function validateBase64String (s: string, name: string, min?: number, max?: number): string {
268+
export function validateBase64String (s: string, name: string, min?: number, max?: number): string {
269269
s = s.trim()
270270
if (s.length === 0) {
271271
throw new WERR_INVALID_PARAMETER(name, 'valid base64 string')
272272
}
273273

274274
let paddingCount = 0
275-
let validCharCount = 0
276-
277275
for (let i = 0; i < s.length; i++) {
278276
const char = s.charCodeAt(i)
279277
if (char >= 65 && char <= 90) continue // A-Z

0 commit comments

Comments
 (0)