Skip to content

Commit

Permalink
Fixed error in fetching slp address utxos
Browse files Browse the repository at this point in the history
  • Loading branch information
joemarct committed May 30, 2021
1 parent 8462860 commit 6f7ea01
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main/views/view_utxo.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,20 @@ def get(self, request, *args, **kwargs):
qs = Transaction.objects.filter(query)
utxos_values = qs.annotate(
vout=F('index'),
token_id=F('token__tokenid'),
tokenid=F('token__tokenid'),
token_name=F('token__name'),
token_ticker=F('token__token_ticker'),
token_type=F('token__token_type'),
block=F('blockheight__number'),
).values(
'txid',
'vout',
'token_id',
'amount',
'tokenid',
'token_name',
'token_ticker',
'block',
'token_type'
'token_type',
'block'
)

data['utxos'] = list(utxos_values)
Expand Down

0 comments on commit 6f7ea01

Please sign in to comment.