Skip to content

Commit

Permalink
Fix token-id for sending erc721 tokens
Browse files Browse the repository at this point in the history
- Closes #289
  • Loading branch information
Uxio0 committed Nov 7, 2023
1 parent a4ce370 commit b12374e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions safe_cli/prompt_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,10 @@ def remove_delegate(args):
parser_send_ether = subparsers.add_parser("send_ether")
parser_send_erc20 = subparsers.add_parser("send_erc20")
parser_send_erc721 = subparsers.add_parser("send_erc721")
parser_drain = subparsers.add_parser("drain")
parser_send_custom.set_defaults(func=send_custom)
parser_send_ether.set_defaults(func=send_ether)
parser_send_erc20.set_defaults(func=send_erc20)
parser_send_erc721.set_defaults(func=send_erc721)
parser_drain.set_defaults(func=drain)
# They have some common arguments
for parser in (
parser_send_custom,
Expand Down Expand Up @@ -413,10 +411,15 @@ def remove_delegate(args):
for parser in (parser_send_erc20, parser_send_erc721):
parser.add_argument("to", type=check_ethereum_address)
parser.add_argument("token_address", type=check_ethereum_address)
parser.add_argument("amount", type=int)

# Drain only needs destiny account
parser_send_erc20.add_argument("amount", type=int)
parser_send_erc721.add_argument("token-id", type=int)

# Drain only needs receiver account
parser_drain = subparsers.add_parser("drain")
parser_drain.set_defaults(func=drain)
parser_drain.add_argument("to", type=check_ethereum_address)

# Retrieve threshold, nonce or owners
parser_get_threshold = subparsers.add_parser("get_threshold")
parser_get_threshold.set_defaults(func=get_threshold)
Expand Down

0 comments on commit b12374e

Please sign in to comment.