diff --git a/CHANGELOG.md b/CHANGELOG.md index a6d80618a..5047a1da7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,16 +18,17 @@ at anytime. * ### Deprecated - * + * `channel_list_mine`, replaced with `channel_list` * ### Changed * Check claim schema in `publish` before trying to make the claim, return better error messages - * + * Renamed `channel_list_mine` to `channel_list` + * Changed `channel_list` to include channels where the certificate info has been imported but the claim is not in the wallet ### Added - * * Added `channel_import` and `channel_export` commands + * Added `is_mine` field to `channel_list` results ### Removed * diff --git a/lbrynet/core/Wallet.py b/lbrynet/core/Wallet.py index 8d1f0943c..cefde1f6d 100644 --- a/lbrynet/core/Wallet.py +++ b/lbrynet/core/Wallet.py @@ -904,7 +904,7 @@ class Wallet(object): @defer.inlineCallbacks def channel_list(self): - certificates = yield self._get_certificate_claims() + certificates = yield self.get_certificates_for_signing() results = [] for claim in certificates: formatted = yield self._handle_claim_result(claim) diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index ae4fbf7f4..a2369e9b1 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -1742,9 +1742,27 @@ class Daemon(AuthJSONRPCServer): @AuthJSONRPCServer.auth_required @defer.inlineCallbacks + def jsonrpc_channel_list(self): + """ + Get certificate claim infos for channels that can be published to + + Usage: + channel_list + + Returns: + (list) ClaimDict, includes 'is_mine' field to indicate if the certificate claim + is in the wallet. + """ + + result = yield self.session.wallet.channel_list() + response = yield self._render_response(result) + defer.returnValue(response) + + @AuthJSONRPCServer.deprecated("channel_list") + @AuthJSONRPCServer.auth_required def jsonrpc_channel_list_mine(self): """ - Get my channels + Get certificate claim infos for channels that can be published to (deprecated) Usage: channel_list_mine @@ -1753,9 +1771,7 @@ class Daemon(AuthJSONRPCServer): (list) ClaimDict """ - result = yield self.session.wallet.channel_list() - response = yield self._render_response(result) - defer.returnValue(response) + return self.jsonrpc_channel_list() @AuthJSONRPCServer.auth_required @defer.inlineCallbacks