Skip to content

Commit c723b72

Browse files
committed
tests: fix EIP55 encoding
1 parent a40ddbc commit c723b72

File tree

2 files changed

+632
-632
lines changed

2 files changed

+632
-632
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ function encode (address) {
1212
var byte = checksum[i]
1313
var ha = address.charAt(i * 2)
1414
var hb = address.charAt(i * 2 + 1)
15-
ret += (byte & 0xf0) > 0x80 ? ha.toUpperCase() : ha
16-
ret += (byte & 0x0f) > 0x08 ? hb.toUpperCase() : hb
15+
ret += (byte & 0xf0) >= 0x80 ? ha.toUpperCase() : ha
16+
ret += (byte & 0x0f) >= 0x08 ? hb.toUpperCase() : hb
1717
}
1818

1919
return ret

0 commit comments

Comments
 (0)