Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Usage: sendpayment.py [options] [wallet file / fromaccount] #527

Open
HamishMacEwan opened this issue May 15, 2016 · 1 comment
Open

Usage: sendpayment.py [options] [wallet file / fromaccount] #527

HamishMacEwan opened this issue May 15, 2016 · 1 comment

Comments

@HamishMacEwan
Copy link

Hi,

The ability to spend from the wallet rather than the joinmarket is useful, but I'm unclear on how to do it. I don't understand what "fromaccount" means.

In the past I have just put a null string there:

python sendpayment.py --rpcwallet --yes -N4 "" [amount] [destaddr]

But if I fumble and enter the wrong password (for a joinmarket wallet, instead of the Bitcoin Core wallet) it fails without much help to the user.

2016-05-16 08:59:28,865 [MainThread  ] [DEBUG]  Traceback (most recent call last):
  File "sendpayment.py", line 314, in main
    irc.run()
  File "/home/user/bin/joinmarket-myygs/joinmarket/irc.py", line 639, in run
    self.__handle_line(line)
  File "/home/user/bin/joinmarket-myygs/joinmarket/irc.py", line 522, in __handle_line
    self.__handle_privmsg(_chunks[0], _chunks[2], get_irc_text(line))
  File "/home/user/bin/joinmarket-myygs/joinmarket/irc.py", line 473, in __handle_privmsg
    self.__on_privmsg(nick, parsed)
  File "/home/user/bin/joinmarket-myygs/joinmarket/irc.py", line 328, in __on_privmsg
    self.on_pubkey(nick, maker_pk)
  File "/home/user/bin/joinmarket-myygs/joinmarket/taker.py", line 555, in on_pubkey
    self.cjtx.start_encryption(nick, maker_pubkey)
  File "/home/user/bin/joinmarket-myygs/joinmarket/taker.py", line 91, in start_encryption
    my_btc_priv = self.wallet.get_key_from_addr(my_btc_addr)
  File "/home/user/bin/joinmarket-myygs/joinmarket/wallet.py", line 308, in get_key_from_addr
    self.ensure_wallet_unlocked()
  File "/home/user/bin/joinmarket-myygs/joinmarket/wallet.py", line 344, in ensure_wallet_unlocked
    except jm_single().JsonRpcError as exc:
AttributeError: 'AttributeDict' object has no attribute 'JsonRpcError'

Could the --help be clarified and the error message improved?

@chris-belcher
Copy link
Collaborator

Thanks for the report.

fromaccount is the same as in the bitcoin core sendfrom RPC call

  1. "fromaccount" (string, required) The name of the account to send funds from. May be the default account using "".

However I see now that accounts are deprecated so maybe we should just remove them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants