Skip to content
Snippets Groups Projects
Commit 5d3ccdef authored by inso's avatar inso
Browse files

Small fix due to a misunderstood of the ucoinpy Transfer class.

parent e388a222
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ RESOURCE_DIR = res/ui
COMPILED_DIR = src/cutecoin/gen_resources
#UI files to compile
UI_FILES = mainwindow.ui addAccountDialog.ui addCommunityDialog.ui communityTabWidget.ui issuanceDialog.ui transferDialog.ui
UI_FILES = mainwindow.ui addAccountDialog.ui addCommunityDialog.ui communityTabWidget.ui issuanceDialog.ui transferDialog.ui addContactDialog.ui
#Qt resource files to compile
RESOURCES =
......
......@@ -62,7 +62,7 @@ class TransferMoneyDialog(QDialog, Ui_TransferMoneyDialog):
pass
def accept(self):
sentCoins = self.listView_coinsSent.model().toString()
sentCoins = self.listView_coinsSent.model().toList()
recipient = None
if self.radio_keyFingerprint.isChecked():
......
......@@ -95,14 +95,12 @@ class Account(object):
def issuedLastDividend(self, community):
currentAmendmentNumber = community.amendmentNumber()
if community in self.communities.communitiesList:
dividendsData = community.ucoinRequest(ucoin.hdc.transactions.sender.issuance.Dividend(self.keyFingerprint(), currentAmendmentNumber))
for dividend in dividendsData:
# Small bug in ucoinpy library
if not isinstance(dividend, str):
return True
return False
def issueDividend(self, community, coins):
......@@ -112,7 +110,7 @@ class Account(object):
return issuance()
def transferCoins(self, node, recipient, coins, message):
transfer = ucoin.wrappers.transactions.Transfer(self.keyFingerprint(), recipient.fingerprint, coins, message, keyid=self.pgpKeyId, server=node.server, port=node.port)
transfer = ucoin.wrappers.transactions.RawTransfer(self.keyFingerprint(), recipient.fingerprint, coins, message, keyid=self.pgpKeyId, server=node.server, port=node.port)
return transfer()
def jsonify(self):
......
......@@ -29,9 +29,8 @@ class CoinsListModel(QAbstractListModel):
def flags(self,index):
return Qt.ItemIsSelectable | Qt.ItemIsEnabled
def toString(self):
def toList(self):
coinsList = []
for c in self.coins:
coinsList.append(c.getId())
coinsStr = ",".join(coinsList)
return coinsStr
\ No newline at end of file
return coinsList
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment