Skip to content

Commit

Permalink
Additional comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed May 15, 2024
1 parent 7c117d7 commit ee4345e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ function decodeFromBech32(options: { value: string; allowCustomHrp: boolean }):
}

// Workaround, in order to avoid behavioral breaking changes on legacy flows.
// In a future major release, we should drop this constraint (not exactly useful, validation should be performed in other ways)
if (!allowCustomHrp && hrp != DEFAULT_HRP) {
throw new errors.ErrAddressBadHrp(DEFAULT_HRP, hrp);
}
Expand Down

0 comments on commit ee4345e

Please sign in to comment.