From 3d82becadc0a4e3318d94592e2d6b72ea6538df3 Mon Sep 17 00:00:00 2001
From: Lex Berezhny <lex@damoti.com>
Date: Sun, 13 Oct 2019 21:46:55 -0400
Subject: [PATCH] utxo release applies to all accounts in wallet

---
 lbry/lbry/extras/daemon/Daemon.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lbry/lbry/extras/daemon/Daemon.py b/lbry/lbry/extras/daemon/Daemon.py
index 0a62dae0b..f25e4d1fa 100644
--- a/lbry/lbry/extras/daemon/Daemon.py
+++ b/lbry/lbry/extras/daemon/Daemon.py
@@ -3394,7 +3394,11 @@ class Daemon(metaclass=JSONRPCServerType):
             None
         """
         wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
-        return wallet.get_account_or_default(account_id).release_all_outputs()
+        if account_id is not None:
+            wallet.get_account_or_error(account_id).release_all_outputs()
+        else:
+            for account in wallet.accounts:
+                account.release_all_outputs()
 
     BLOB_DOC = """
     Blob management.