import click


def get_stake_amount() -> float:
    """Retrieve desired stake amount from user

    Each stake is 10 TRB on TellorFlex Polygon. If an address
    is not staked for any reason, the PolygonReporter will attempt
    to stake. Number of stakes determines the reporter lock:

    reporter_lock = 12hrs / N * stakes

    Retrieves desidred stake amount from user input."""

    msg = "Enter amount TRB to stake if unstaked:"
    stake = click.prompt(msg, type=float, default=10.0, show_default=True)
    assert isinstance(stake, float)
    assert stake >= 10.0

    return stake