Skip to content

Commit

Permalink
wallet tx list update
Browse files Browse the repository at this point in the history
now it shows if the scarletcoins were received or sent (+ or -) for each tx
  • Loading branch information
Alessio Della Santa committed Feb 19, 2022
1 parent d240830 commit 1e58803
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wallet/txlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ def setupUi(self, MainWindow,addr):
self.tableWidget.setRowCount(len(res))
row=0
for e in res:

txid=e[:32]
amount=e[e.rfind(':')+1:].strip()
self.tableWidget.setItem(row, 0, QtWidgets.QTableWidgetItem(txid))
self.tableWidget.setItem(row, 1, QtWidgets.QTableWidgetItem(amount))
if e[33:49]==addr:
amount='- '+str(amount)
self.tableWidget.setItem(row, 1, QtWidgets.QTableWidgetItem(amount))
elif e[50:-3]==addr:
amount='+ '+str(amount)
self.tableWidget.setItem(row, 1, QtWidgets.QTableWidgetItem(amount))
row+=1


Expand Down

0 comments on commit 1e58803

Please sign in to comment.