Skip to content

Commit d0de670

Browse files
committed
fix lint
1 parent 48c8e2c commit d0de670

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Utils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ interface IWordArray {
1313
sigBytes: number
1414
}
1515

16-
1716
/**
1817
* Return true if the number or string is an address value. This does not check the network for a valid
1918
* address, but just checks to see if it is a number
@@ -162,17 +161,16 @@ export function isHexSring(hex: string): boolean {
162161
* characters from 0 - 9 and a-f
163162
*/
164163
export function hexToByteArray(hex: string): Uint8Array {
165-
if ( !isHexSring(hex)) {
164+
if (!isHexSring(hex)) {
166165
throw TypeError(`the hex string ${hex} contains non hex characters`)
167166
}
168-
const pairs = hex.match(/[0-9a-f]{2}/ig)
167+
const pairs = hex.match(/[0-9a-f]{2}/gi)
169168
const values = pairs.map((p) => {
170169
return parseInt(p, 16)
171170
})
172171
return new Uint8Array(values)
173172
}
174173

175-
176174
/*
177175
* Code originally copied from crypto-js for conversion Latin1 to and from WordArray
178176
* but changed to return/input Uint8Array

0 commit comments

Comments
 (0)