Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
2523046b
Commit
2523046b
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug when receiving money from unknown pubkey
parent
d56411ca
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cutecoin/models/received.py
+6
-2
6 additions, 2 deletions
src/cutecoin/models/received.py
src/cutecoin/models/sent.py
+6
-2
6 additions, 2 deletions
src/cutecoin/models/sent.py
with
12 additions
and
4 deletions
src/cutecoin/models/received.py
+
6
−
2
View file @
2523046b
...
@@ -6,6 +6,7 @@ Created on 5 févr. 2014
...
@@ -6,6 +6,7 @@ Created on 5 févr. 2014
import
logging
import
logging
from
..core.person
import
Person
from
..core.person
import
Person
from
..tools.exceptions
import
PersonNotFoundError
from
PyQt5.QtCore
import
QAbstractListModel
,
Qt
from
PyQt5.QtCore
import
QAbstractListModel
,
Qt
...
@@ -36,8 +37,11 @@ class ReceivedListModel(QAbstractListModel):
...
@@ -36,8 +37,11 @@ class ReceivedListModel(QAbstractListModel):
if
o
.
pubkey
in
pubkeys
:
if
o
.
pubkey
in
pubkeys
:
amount
+=
o
.
amount
amount
+=
o
.
amount
pubkey
=
transactions
[
row
].
issuers
[
0
]
pubkey
=
transactions
[
row
].
issuers
[
0
]
sender
=
Person
.
lookup
(
pubkey
,
self
.
community
)
try
:
value
=
"
{0} from {1}
"
.
format
(
amount
,
sender
.
name
)
sender
=
Person
.
lookup
(
pubkey
,
self
.
community
)
value
=
"
{0} from {1}
"
.
format
(
amount
,
sender
.
name
)
except
PersonNotFoundError
:
value
=
"
{0} from {1}
"
.
format
(
amount
,
pubkey
)
return
value
return
value
def
flags
(
self
,
index
):
def
flags
(
self
,
index
):
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/models/sent.py
+
6
−
2
View file @
2523046b
...
@@ -6,6 +6,7 @@ Created on 5 févr. 2014
...
@@ -6,6 +6,7 @@ Created on 5 févr. 2014
import
logging
import
logging
from
..core.person
import
Person
from
..core.person
import
Person
from
..tools.exceptions
import
PersonNotFoundError
from
PyQt5.QtCore
import
QAbstractListModel
,
Qt
from
PyQt5.QtCore
import
QAbstractListModel
,
Qt
from
PyQt5.QtGui
import
QFont
from
PyQt5.QtGui
import
QFont
...
@@ -44,8 +45,11 @@ class SentListModel(QAbstractListModel):
...
@@ -44,8 +45,11 @@ class SentListModel(QAbstractListModel):
if
o
.
pubkey
not
in
pubkeys
:
if
o
.
pubkey
not
in
pubkeys
:
outputs
.
append
(
o
)
outputs
.
append
(
o
)
amount
+=
o
.
amount
amount
+=
o
.
amount
receiver
=
Person
.
lookup
(
outputs
[
0
].
pubkey
,
self
.
community
)
try
:
value
=
"
{0} to {1}
"
.
format
(
amount
,
receiver
.
name
)
receiver
=
Person
.
lookup
(
outputs
[
0
].
pubkey
,
self
.
community
)
value
=
"
{0} to {1}
"
.
format
(
amount
,
receiver
.
name
)
except
PersonNotFoundError
:
value
=
"
{0} to {1}
"
.
format
(
amount
,
outputs
[
0
].
pubkey
)
return
value
return
value
if
role
==
Qt
.
FontRole
:
if
role
==
Qt
.
FontRole
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment