Skip to content

Commit

Permalink
Namecoin: Use PartialTxInput fields in UNOList
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Feb 10, 2020
1 parent 1d834b4 commit a5341b5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions electrum_nmc/electrum/gui/qt/uno_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ def update(self):
super().update()

def insert_utxo(self, idx, utxo: PartialTxInput):
txid = utxo.get('prevout_hash')
vout = utxo.get('prevout_n')
output = self.wallet.db.transactions[txid].outputs()[vout]
name_op = output.name_op
txid = utxo.prevout.txid
vout = utxo.prevout.out_idx
name_op = utxo.name_op
if name_op is None:
return

Expand All @@ -97,7 +96,7 @@ def insert_utxo(self, idx, utxo: PartialTxInput):
status = _('Registration Pending')
else:
# utxo is name_anyupdate
height = utxo.get('height')
height = utxo.block_height
header_at_tip = self.network.blockchain().header_at_tip()
#chain_height = self.network.blockchain().height()
if header_at_tip is not None:
Expand Down Expand Up @@ -139,7 +138,7 @@ def insert_utxo(self, idx, utxo: PartialTxInput):

utxo_item[self.Columns.EXPIRES_IN].setToolTip(formatted_expires_in)

address = utxo.get('address')
address = utxo.address
if self.wallet.is_frozen_address(address) or self.wallet.is_frozen_coin(utxo):
utxo_item[self.Columns.NAME].setBackground(ColorScheme.BLUE.as_color(True))
if self.wallet.is_frozen_address(address) and self.wallet.is_frozen_coin(utxo):
Expand Down

0 comments on commit a5341b5

Please sign in to comment.