mirror of https://github.com/nucypher/nucypher.git
Fixes several inaccurate Tuple hints; Keep at_periods checking for None.
parent
5ac0351f16
commit
065ca73689
|
@ -341,7 +341,7 @@ class StakingEscrowAgent(EthereumContractAgent):
|
|||
|
||||
Returns an amount of NuNits.
|
||||
"""
|
||||
if not at_period:
|
||||
if at_period is None: # allow 0, vs default
|
||||
# Get the current period on-chain by default.
|
||||
at_period = self.contract.functions.getCurrentPeriod().call()
|
||||
return NuNits(self.contract.functions.lockedPerPeriod(at_period).call())
|
||||
|
|
|
@ -92,6 +92,6 @@ class StakerInfo(NamedTuple):
|
|||
worker_start_period: Period
|
||||
worker: ChecksumAddress
|
||||
flags: int
|
||||
downtime: Tuple[Downtime]
|
||||
substake_info: Tuple[RawSubStakeInfo]
|
||||
history: Tuple[int]
|
||||
downtime: Tuple[Downtime, ...]
|
||||
substake_info: Tuple[RawSubStakeInfo, ...]
|
||||
history: Tuple[int, ...]
|
||||
|
|
Loading…
Reference in New Issue