Skip to content

Commit

Permalink
use default value for hrp argument
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Dec 2, 2024
1 parent 7cf6564 commit 0ee9036
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions multiversx_sdk_cli/cli_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def setup_parser(args: List[str], subparsers: Any) -> Any:
group = sub.add_mutually_exclusive_group(required=True)
group.add_argument("--encode", action="store_true", help="whether to encode")
group.add_argument("--decode", action="store_true", help="whether to decode")
sub.add_argument("--hrp", type=str, help="the human readable part; only used for encoding to bech32")
sub.add_argument("--hrp", type=str, help="the human readable part; only used for encoding to bech32 (default: %(default)s)", default=get_address_hrp())
sub.set_defaults(func=do_bech32)

sub = cli_shared.add_command_subparser(
Expand Down Expand Up @@ -290,7 +290,7 @@ def do_bech32(args: Any):
value = args.value

if encode:
hrp = args.hrp if args.hrp else get_address_hrp()
hrp = args.hrp
address = Address.new_from_hex(value, hrp)
result = address.to_bech32()
else:
Expand Down

0 comments on commit 0ee9036

Please sign in to comment.