Skip to content
Snippets Groups Projects

Implementation of the delegation part of HP management

Merged Jakub Ziebinski requested to merge jziebinski/prepare-delegations into develop
Compare and Show latest version
6 files
+ 15
14
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -89,7 +89,7 @@ class DelegationsTable(CliveCheckerboardTable):
def __init__(self) -> None:
super().__init__(
Static("Your delegations", id="delegations-table-title"), DelegationsTableHeader(), dynamic=True
Static("Current delegations", id="delegations-table-title"), DelegationsTableHeader(), dynamic=True
)
def create_dynamic_rows(self, content: HivePowerData) -> list[Widget]:
@@ -128,7 +128,7 @@ class DelegateHivePower(TabPane, OperationActionBindings):
self._shares_input = HPVestsAmountInput()
def compose(self) -> ComposeResult:
yield Static("Delegate your shares:", id="delegatee-title")
yield Static("Delegate your shares", id="delegatee-title")
with Vertical(id="inputs-container"):
yield self._delegatee_input
yield self._shares_input
@@ -155,10 +155,11 @@ class DelegateHivePower(TabPane, OperationActionBindings):
"""Clear input when shares type was changed and hide factor display when vests selected."""
self._shares_input.input.value = ""
hp_vests_factor = self.query_one(HpVestsFactor)
if self._shares_input.selected_asset_type is Asset.Vests:
self.query_one(HpVestsFactor).display = False
hp_vests_factor.display = False
return
self.query_one(HpVestsFactor).display = True
hp_vests_factor.display = True
@property
def provider(self) -> HivePowerDataProvider:
Loading