forked from LBRYCommunity/lbry-sdk
no need to catch exception when abandoning in Daemon
This commit is contained in:
parent
4e8d8dfc23
commit
7a2f607998
1 changed files with 3 additions and 12 deletions
|
@ -1880,18 +1880,9 @@ class Daemon(AuthJSONRPCServer):
|
|||
if nout is None and txid is not None:
|
||||
raise Exception('Must specify nout')
|
||||
|
||||
try:
|
||||
abandon_claim_tx = yield self.session.wallet.abandon_claim(claim_id, txid, nout)
|
||||
self.analytics_manager.send_claim_action('abandon')
|
||||
response = yield self._render_response(abandon_claim_tx)
|
||||
except BaseException as err:
|
||||
log.warning(err)
|
||||
# pylint: disable=unsubscriptable-object
|
||||
if len(err.args) and err.args[0] == "txid was not found in wallet":
|
||||
raise Exception("This transaction was not found in your wallet")
|
||||
else:
|
||||
response = yield self._render_response(err)
|
||||
defer.returnValue(response)
|
||||
result = yield self.session.wallet.abandon_claim(claim_id, txid, nout)
|
||||
self.analytics_manager.send_claim_action('abandon')
|
||||
defer.returnValue(result)
|
||||
|
||||
@AuthJSONRPCServer.auth_required
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Reference in a new issue