Skip to content

Commit b4a8f98

Browse files
committed
Wallet: lint fixes
1 parent c819cd0 commit b4a8f98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/wallet/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function validateHexString(paramName: string, str: string, length?: number) {
8282
if (str.toLowerCase().startsWith('0x')) {
8383
str = str.slice(2)
8484
}
85-
if (!str && !length) {
85+
if (!str && length === undefined) {
8686
return str
8787
}
8888
if ((length as number) % 2) {
@@ -652,7 +652,7 @@ export class Wallet {
652652
* Alternative manual way with padding and Date fields: http://stackoverflow.com/a/7244288/4964819
653653
*
654654
*/
655-
const ts = timestamp ? new Date(timestamp) : new Date()
655+
const ts = timestamp !== undefined ? new Date(timestamp) : new Date()
656656
return ['UTC--', ts.toJSON().replace(/:/g, '-'), '--', this.getAddress().toString('hex')].join(
657657
''
658658
)

0 commit comments

Comments
 (0)