@zilliqa-js/crypto
Advanced tools
Comparing version 0.8.8 to 0.8.9
@@ -618,3 +618,6 @@ import { BN, validation, bytes } from '@zilliqa-js/util'; | ||
} | ||
return toChecksumAddress(address); | ||
if (!isValidChecksumAddress(address)) { | ||
throw Error('Wrong address format, should be either bech32 or checksummed address'); | ||
} | ||
return address; | ||
}; | ||
@@ -621,0 +624,0 @@ /** |
@@ -622,3 +622,6 @@ (function (global, factory) { | ||
} | ||
return toChecksumAddress(address); | ||
if (!isValidChecksumAddress(address)) { | ||
throw Error('Wrong address format, should be either bech32 or checksummed address'); | ||
} | ||
return address; | ||
}; | ||
@@ -625,0 +628,0 @@ /** |
@@ -182,3 +182,6 @@ "use strict"; | ||
} | ||
return exports.toChecksumAddress(address); | ||
if (!exports.isValidChecksumAddress(address)) { | ||
throw Error('Wrong address format, should be either bech32 or checksummed address'); | ||
} | ||
return address; | ||
}; | ||
@@ -185,0 +188,0 @@ /** |
{ | ||
"name": "@zilliqa-js/crypto", | ||
"version": "0.8.8", | ||
"version": "0.8.9", | ||
"description": "Core crypto utilities for signing/verification/hashing Zilliqa transactions.", | ||
@@ -42,3 +42,3 @@ "author": "Ian Tan (https://github.com/iantanwx)", | ||
}, | ||
"gitHead": "918706697fed29f75195fa055286b142c1e2f96c" | ||
"gitHead": "e2c15537bad7337f20382e5bc077f3a9aa6d501f" | ||
} |
@@ -205,3 +205,10 @@ // This file is part of Zilliqa-Javascript-Library. | ||
} | ||
return toChecksumAddress(address); | ||
if (!isValidChecksumAddress(address)) { | ||
throw Error( | ||
'Wrong address format, should be either bech32 or checksummed address', | ||
); | ||
} | ||
return address; | ||
}; | ||
@@ -208,0 +215,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1881139
16770