Deduplicate multiple matches in by-state list

This commit is contained in:
lash 2022-05-06 14:00:05 +00:00
parent c54661d39e
commit 2a9bf41cf5
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ argparser.add_argument('--include-pending', action='store_true', dest='include_p
argparser.add_argument('--renderer', type=str, default=[], action='append', help='Transaction renderer for output') argparser.add_argument('--renderer', type=str, default=[], action='append', help='Transaction renderer for output')
#argparser.add_argument('--summary', action='store_true', help='output summary for each status category') #argparser.add_argument('--summary', action='store_true', help='output summary for each status category')
#argparser.add_argument('-o', '--column', dest='column', action='append', type=str, help='add a column to display') #argparser.add_argument('-o', '--column', dest='column', action='append', type=str, help='add a column to display')
argparser.add_positional('address', type=str, help='Ethereum address of recipient') argparser.add_positional('address', required=False, type=str, help='Ethereum address of recipient')
args = argparser.parse_args() args = argparser.parse_args()
extra_args = { extra_args = {
'address': None, 'address': None,

View File

@ -104,6 +104,7 @@ class Store:
else: else:
for v in self.state_store.elements(state, numeric=True): for v in self.state_store.elements(state, numeric=True):
refs_state += self.state_store.list(v) refs_state += self.state_store.list(v)
refs_state = list(set(refs_state))
if include_pending: if include_pending:
refs_state += self.state_store.list(0) refs_state += self.state_store.list(0)