_rpc_trade_status argument datatype optimizations

This commit is contained in:
Andreas Brunner 2021-01-18 15:26:53 +01:00
parent eb95d970e9
commit a68a546dd9
2 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ class RPC:
}
return val
def _rpc_trade_status(self, trade_ids=None) -> List[Dict[str, Any]]:
def _rpc_trade_status(self, trade_ids: List[int] = []) -> List[Dict[str, Any]]:
"""
Below follows the RPC backend it is prefixed with rpc_ to raise awareness that it is
a remotely exposed function

View File

@ -280,9 +280,9 @@ class Telegram(RPCHandler):
# Check if there's at least one numerical ID provided.
# If so, try to get only these trades.
trade_ids = None
trade_ids = []
if context.args and len(context.args) > 0:
trade_ids = [i for i in context.args if i.isnumeric()]
trade_ids = [int(i) for i in context.args if i.isnumeric()]
results = self._rpc._rpc_trade_status(trade_ids=trade_ids)