Removed include_tip_info from transaction_list, goes with lbryum#183

This commit is contained in:
hackrush 2018-01-12 01:11:35 +05:30
parent 02a5069e3a
commit 7472d12644
3 changed files with 44 additions and 29 deletions

View file

@ -48,6 +48,7 @@ at anytime.
* Added a new startup stage to indicate if the daemon is waiting for the `wallet_unlock` command.
* Add `--conf` CLI flag to specify an alternate config file
* Added `blockchain_name` and `lbryum_servers` to the adjustable settings
* Added abandon information(claim name, id, address, amount, balance_delta and nout) about claims/supports/updates to `transaction_list` command, under `abandon_info` key
### Changed
* claim_show API command no longer takes name as argument
@ -73,6 +74,7 @@ at anytime.
* Removed old and unused UI related code
* Removed claim information from lbry file internals
* Removed `auto_re_reflect` setting from the conf file, use the `reflect_uploads` setting instead
* Removed include_tip_info argument from transaction_list, which will now always include tip information.
## [0.18.0] - 2017-11-08

View file

@ -992,8 +992,8 @@ class Wallet(object):
d = self._get_blockhash(height)
return d
def get_history(self, include_tip_info):
d = self._get_history(include_tip_info)
def get_history(self):
d = self._get_history()
return d
def address_is_mine(self, address):
@ -1117,7 +1117,7 @@ class Wallet(object):
def _get_balance_for_address(self, address):
return defer.fail(NotImplementedError())
def _get_history(self, include_tip_info):
def _get_history(self):
return defer.fail(NotImplementedError())
def _address_is_mine(self, address):
@ -1519,9 +1519,7 @@ class LBRYumWallet(Wallet):
def get_nametrie(self):
return self._run_cmd_as_defer_to_thread('getclaimtrie')
def _get_history(self, include_tip_info):
if include_tip_info:
return self._run_cmd_as_defer_succeed('tiphistory')
def _get_history(self):
return self._run_cmd_as_defer_succeed('claimhistory')
def _address_is_mine(self, address):

View file

@ -2349,47 +2349,62 @@ class Daemon(AuthJSONRPCServer):
defer.returnValue(response)
@AuthJSONRPCServer.auth_required
@AuthJSONRPCServer.flags(include_tip_info='-t')
def jsonrpc_transaction_list(self, include_tip_info=False):
def jsonrpc_transaction_list(self):
"""
List transactions belonging to wallet
Usage:
transaction_list [-t]
Options:
-t : Include claim tip information
transaction_list
Returns:
(list) List of transactions, where is_tip is null by default,
and set to a boolean if include_tip_info is true
(list) List of transactions(balance_delta field returns the amount debited/credited from
your wallet)
{
"claim_info": (list) claim info if in txn [{"amount": (float) claim amount,
"claim_id": (str) claim id,
"claim_name": (str) claim name,
"nout": (int) nout}],
"claim_info": (list) claim info if in txn [{
"address": (str) address of claim,
"balance_delta": (float) bid amount,
"amount": (float) claim amount,
"claim_id": (str) claim id,
"claim_name": (str) claim name,
"nout": (int) nout
}],
"abandon_info": (list) abandon info if in txn [{
"address": (str) address of abandoned claim,
"balance_delta": (float) returned amount,
"amount": (float) claim amount,
"claim_id": (str) claim id,
"claim_name": (str) claim name,
"nout": (int) nout
}],
"confirmations": (int) number of confirmations for the txn,
"date": (str) date and time of txn,
"fee": (float) txn fee,
"support_info": (list) support info if in txn [{"amount": (float) support amount,
"claim_id": (str) claim id,
"claim_name": (str) claim name,
"is_tip": (null) default,
(bool) if include_tip_info is true,
"nout": (int) nout}],
"support_info": (list) support info if in txn [{
"address": (str) address of support,
"balance_delta": (float) support amount,
"amount": (float) support amount,
"claim_id": (str) claim id,
"claim_name": (str) claim name,
"is_tip": (bool),
"nout": (int) nout
}],
"timestamp": (int) timestamp,
"txid": (str) txn id,
"update_info": (list) update info if in txn [{"amount": (float) updated amount,
"claim_id": (str) claim id,
"claim_name": (str) claim name,
"nout": (int) nout}],
"update_info": (list) update info if in txn [{
"address": (str) address of claim,
"balance_delta": (float) difference amount,
"amount": (float) absolute amount,
"claim_id": (str) claim id,
"claim_name": (str) claim name,
"nout": (int) nout
}],
"value": (float) value of txn
}
"""
d = self.session.wallet.get_history(include_tip_info)
d = self.session.wallet.get_history()
d.addCallback(lambda r: self._render_response(r))
return d