From 9e873f77f9a2c65d9a7bb187fbbd867761e49bee Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 2 Oct 2019 09:32:27 -0400 Subject: [PATCH] bug fixes related to cross-account / wallet operations --- lbry/lbry/extras/daemon/Daemon.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lbry/lbry/extras/daemon/Daemon.py b/lbry/lbry/extras/daemon/Daemon.py index 71238fadf..6557e468d 100644 --- a/lbry/lbry/extras/daemon/Daemon.py +++ b/lbry/lbry/extras/daemon/Daemon.py @@ -1518,7 +1518,12 @@ class Daemon(metaclass=JSONRPCServerType): Returns: {Transaction} """ wallet = self.wallet_manager.get_wallet_or_default(wallet_id) - account = wallet.get_account_or_default(account_id) + if account_id: + account = wallet.get_account_or_error(account_id) + accounts = [account] + else: + account = wallet.default_account + accounts = wallet.accounts amount = self.get_dewies_or_error("amount", amount) if not amount: @@ -1539,14 +1544,14 @@ class Daemon(metaclass=JSONRPCServerType): ) tx = await Transaction.create( - [], outputs, [account], account + [], outputs, accounts, account ) if not preview: await self.ledger.broadcast(tx) await self.analytics_manager.send_credits_sent() else: - await account.ledger.release_tx(tx) + await self.ledger.release_tx(tx) return tx