add --blocking to account_send

This commit is contained in:
Jack Robison 2020-07-02 17:28:47 -04:00
parent a50a625b3b
commit 644120ca31
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1782,24 +1782,26 @@ class Daemon(metaclass=JSONRPCServerType):
) )
@requires(WALLET_COMPONENT) @requires(WALLET_COMPONENT)
def jsonrpc_account_send(self, amount, addresses, account_id=None, wallet_id=None, preview=False): def jsonrpc_account_send(self, amount, addresses, account_id=None, wallet_id=None, preview=False, blocking=False):
""" """
Send the same number of credits to multiple addresses from a specific account (or default account). Send the same number of credits to multiple addresses from a specific account (or default account).
Usage: Usage:
account_send <amount> <addresses>... [--account_id=<account_id>] [--wallet_id=<wallet_id>] [--preview] account_send <amount> <addresses>... [--account_id=<account_id>] [--wallet_id=<wallet_id>] [--preview]
[--blocking]
Options: Options:
--account_id=<account_id> : (str) account to fund the transaction --account_id=<account_id> : (str) account to fund the transaction
--wallet_id=<wallet_id> : (str) restrict operation to specific wallet --wallet_id=<wallet_id> : (str) restrict operation to specific wallet
--preview : (bool) do not broadcast the transaction --preview : (bool) do not broadcast the transaction
--blocking : (bool) wait until tx has synced
Returns: {Transaction} Returns: {Transaction}
""" """
return self.jsonrpc_wallet_send( return self.jsonrpc_wallet_send(
amount=amount, addresses=addresses, wallet_id=wallet_id, amount=amount, addresses=addresses, wallet_id=wallet_id,
change_account_id=account_id, funding_account_ids=[account_id] if account_id else [], change_account_id=account_id, funding_account_ids=[account_id] if account_id else [],
preview=preview preview=preview, blocking=blocking
) )
SYNC_DOC = """ SYNC_DOC = """