Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
clive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Show more breadcrumbs
hive
clive
Commits
40bd0763
Commit
40bd0763
authored
1 year ago
by
Jakub Ziebinski
Committed by
Jakub Ziebinski
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Create operation_summary screen with remove withdraw vesting route
parent
b11603e2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clive/__private/ui/operations/operation_summary/remove_withdraw_vesting_route.py
+43
-0
43 additions, 0 deletions
...ations/operation_summary/remove_withdraw_vesting_route.py
with
43 additions
and
0 deletions
clive/__private/ui/operations/operation_summary/remove_withdraw_vesting_route.py
0 → 100644
+
43
−
0
View file @
40bd0763
from
__future__
import
annotations
from
typing
import
TYPE_CHECKING
,
ClassVar
,
Final
from
clive.__private.ui.operations.operation_summary.operation_summary
import
OperationSummary
from
clive.__private.ui.widgets.inputs.labelized_input
import
LabelizedInput
from
schemas.operations
import
SetWithdrawVestingRouteOperation
if
TYPE_CHECKING
:
from
textual.app
import
ComposeResult
from
schemas.apis.database_api.fundaments_of_reponses
import
WithdrawVestingRoutesFundament
as
WithdrawRoute
WITHDRAW_ROUTE_REMOVE_PERCENT
:
Final
[
int
]
=
0
class
RemoveWithdrawVestingRoute
(
OperationSummary
):
"""
Screen to remove withdraw vesting route.
"""
BIG_TITLE
:
ClassVar
[
str
]
=
"
Remove withdraw route
"
def
__init__
(
self
,
withdraw_route
:
WithdrawRoute
)
->
None
:
super
().
__init__
()
self
.
_withdraw_route
=
withdraw_route
def
content
(
self
)
->
ComposeResult
:
yield
LabelizedInput
(
"
From account
"
,
self
.
working_account
)
yield
LabelizedInput
(
"
To account
"
,
self
.
_withdraw_route
.
to_account
)
yield
LabelizedInput
(
"
Percent
"
,
str
(
self
.
_withdraw_route
.
percent
/
100
))
yield
LabelizedInput
(
"
Auto vest
"
,
str
(
self
.
_withdraw_route
.
auto_vest
))
def
_create_operation
(
self
)
->
SetWithdrawVestingRouteOperation
|
None
:
return
SetWithdrawVestingRouteOperation
(
from_account
=
self
.
working_account
,
to_account
=
self
.
_withdraw_route
.
to_account
,
auto_vest
=
self
.
_withdraw_route
.
auto_vest
,
percent
=
WITHDRAW_ROUTE_REMOVE_PERCENT
,
)
@property
def
working_account
(
self
)
->
str
:
return
self
.
app
.
world
.
profile_data
.
working_account
.
name
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