Fixes several inaccurate Tuple hints; Keep at_periods checking for None.

pull/2037/head
Kieran Prasch 2020-06-03 17:03:15 -07:00
parent 5ac0351f16
commit 065ca73689
No known key found for this signature in database
GPG Key ID: 199AB839D4125A62
2 changed files with 4 additions and 4 deletions

View File

@ -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())

View File

@ -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, ...]