Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joon9823 committed Feb 21, 2024
2 parents 760eb37 + f530316 commit 2f9e7e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/bech32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export namespace AccAddress {
* @param hexAddress hex address
*/
export function fromHex(hexAddress: string): AccAddress {
const hex = hexAddress.startsWith('0x') ? hexAddress.slice(2) : hexAddress;
const hex = hexAddress.replace(/^0x0+|^0x|^0+(?!x)/, '');
// That moudule address reach here is nearly impossible
if (hex.length <= 40) {
return bech32.encode(
Expand Down

0 comments on commit 2f9e7e7

Please sign in to comment.