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
GitLab 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
f650a8a6
Commit
f650a8a6
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in Wallet tab with a non-member account
parent
1310cdfb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cutecoin/gui/wallets_tab.py
+41
-25
41 additions, 25 deletions
src/cutecoin/gui/wallets_tab.py
with
41 additions
and
25 deletions
src/cutecoin/gui/wallets_tab.py
+
41
−
25
View file @
f650a8a6
...
@@ -38,20 +38,19 @@ class WalletsTabWidget(QWidget, Ui_WalletsTab):
...
@@ -38,20 +38,19 @@ class WalletsTabWidget(QWidget, Ui_WalletsTab):
parameters
=
self
.
community
.
parameters
parameters
=
self
.
community
.
parameters
last_renewal
=
""
last_renewal
=
""
expiration
=
""
expiration
=
""
certifiers
=
0
certified
=
0
try
:
try
:
person
=
Person
.
lookup
(
self
.
account
.
pubkey
,
self
.
community
)
person
=
Person
.
lookup
(
self
.
account
.
pubkey
,
self
.
community
)
membership
=
person
.
membership
(
self
.
community
)
membership
=
person
.
membership
(
self
.
community
)
certified
=
person
.
unique_valid_certified_by
(
self
.
community
)
certifiers
=
person
.
unique_valid_certifiers_of
(
self
.
community
)
renew_block
=
membership
[
'
blockNumber
'
]
renew_block
=
membership
[
'
blockNumber
'
]
last_renewal
=
self
.
community
.
get_block
(
renew_block
).
mediantime
last_renewal
=
self
.
community
.
get_block
(
renew_block
).
mediantime
expiration
=
last_renewal
+
parameters
[
'
sigValidity
'
]
expiration
=
last_renewal
+
parameters
[
'
sigValidity
'
]
except
MembershipNotFoundError
:
except
MembershipNotFoundError
:
pass
last_renewal
=
None
expiration
=
None
certified
=
person
.
unique_valid_certified_by
(
self
.
community
)
certifiers
=
person
.
unique_valid_certifiers_of
(
self
.
community
)
if
last_renewal
and
expiration
:
date_renewal
=
QDateTime
.
fromTime_t
(
last_renewal
).
date
().
toString
()
date_renewal
=
QDateTime
.
fromTime_t
(
last_renewal
).
date
().
toString
()
date_expiration
=
QDateTime
.
fromTime_t
(
expiration
).
date
().
toString
()
date_expiration
=
QDateTime
.
fromTime_t
(
expiration
).
date
().
toString
()
# set infos in label
# set infos in label
...
@@ -67,7 +66,24 @@ class WalletsTabWidget(QWidget, Ui_WalletsTab):
...
@@ -67,7 +66,24 @@ class WalletsTabWidget(QWidget, Ui_WalletsTab):
"
Membership
"
,
"
Membership
"
,
"
Last renewal on {:}, expiration on {:}
"
.
format
(
date_renewal
,
date_expiration
),
"
Last renewal on {:}, expiration on {:}
"
.
format
(
date_renewal
,
date_expiration
),
"
Your web of trust :
"
,
"
Your web of trust :
"
,
"
Certified by : {0} members; Certifier of : {1} members
"
.
format
(
len
(
certifiers
),
"
Certified by : {:} members; Certifier of : {:} members
"
.
format
(
len
(
certifiers
),
len
(
certified
))
)
)
else
:
# set infos in label
self
.
label_general
.
setText
(
"""
<table cellpadding=
"
5
"
>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td></tr>
<tr><td align=
"
right
"
><b>{:}</b></td><td>{:}</td></tr>
</table>
"""
.
format
(
self
.
account
.
name
,
self
.
account
.
pubkey
,
"
Not a member
"
,
"
Your web of trust :
"
,
"
Certified by : {:} members; Certifier of : {:} members
"
.
format
(
len
(
certifiers
),
len
(
certified
))
len
(
certified
))
)
)
)
)
...
...
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