Skip to content
Snippets Groups Projects

Implement `Power up` part of hive power management

Merged Jakub Ziebinski requested to merge jziebinski/prepare-hp-management into develop
Compare and Show latest version
4 files
+ 33
16
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -2,7 +2,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
from textual.containers import Grid, ScrollableContainer
from textual.containers import Horizontal, ScrollableContainer, Vertical
from textual.widgets import Static, TabPane
from clive.__private.ui.get_css import get_css_from_relative_path
@@ -46,10 +46,11 @@ class PowerUp(TabPane, OperationActionBindings):
with ScrollablePart():
yield Static("Power up corresponds to a `transfer to vesting` operation", id="operation-name-info")
yield Notice("Your governance voting power will be increased after 30 days")
with Grid(id="power-up-inputs"):
with Vertical(id="power-up-inputs"):
yield self._receiver_input
yield self._asset_input
yield GenerousButton(self._asset_input, self._get_hive_balance) # type: ignore[arg-type]
with Horizontal(id="input-with-button"):
yield self._asset_input
yield GenerousButton(self._asset_input, self._get_hive_balance) # type: ignore[arg-type]
def _get_hive_balance(self) -> Asset.Hive:
return self.app.world.profile_data.working_account.data.hive_balance
Loading