Skip to content

Commit

Permalink
Small fix due to a misunderstood of the ucoinpy Transfer class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Insoleet committed Feb 27, 2014
1 parent e388a22 commit 5d3ccde
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 =

Expand Down
2 changes: 1 addition & 1 deletion src/cutecoin/gui/transferMoneyDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def openManageWalletCoins(self):
pass

def accept(self):
sentCoins = self.listView_coinsSent.model().toString()
sentCoins = self.listView_coinsSent.model().toList()
recipient = None

if self.radio_keyFingerprint.isChecked():
Expand Down
4 changes: 1 addition & 3 deletions src/cutecoin/models/account/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ def lastIssuances(self, community):

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):
Expand All @@ -112,7 +110,7 @@ def issueDividend(self, community, coins):
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):
Expand Down
5 changes: 2 additions & 3 deletions src/cutecoin/models/coin/listModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ def data(self,index,role):
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
return coinsList

0 comments on commit 5d3ccde

Please sign in to comment.