Fix painting during WorkLock bidding

pull/2049/head
David Núñez 2020-05-27 02:11:04 +02:00
parent 3866d7304d
commit bb9187fb52
2 changed files with 8 additions and 7 deletions

View File

@ -208,9 +208,10 @@ def bid(general_config: GroupGeneralConfig,
maximum = NU.from_nunits(bidder.economics.maximum_allowed_locked)
available_claim = NU.from_nunits(bidder.available_claim)
message = f'Current bid: {prettify_eth_amount(bidder.get_deposited_eth)} | Claim: {available_claim}\n'
message = f'\nCurrent bid: {prettify_eth_amount(bidder.get_deposited_eth)} | Claim: {available_claim}\n'
if available_claim > maximum:
message += f"This claim is currently above the allowed max ({maximum}), so the bid may be partially refunded.\n"
message += f"\nThis claim is currently above the allowed max ({maximum}), " \
f"so the bid may be partially refunded.\n"
message += f'Note that available claim value may fluctuate until bidding closes and claims are finalized.\n'
emitter.echo(message, color='yellow')

View File

@ -26,11 +26,11 @@ from nucypher.cli.literature import SUCCESSFUL_WORKLOCK_CLAIM, WORKLOCK_AGREEMEN
def paint_bidding_notice(emitter, bidder):
WORKLOCK_AGREEMENT.format(refund_rate=prettify_eth_amount(bidder.worklock_agent.get_bonus_refund_rate()),
end_date=maya.MayaDT(bidder.economics.bidding_end_date).local_datetime(),
bidder_address=bidder.checksum_address,
duration=bidder.economics.worklock_commitment_duration)
emitter.echo(WORKLOCK_AGREEMENT)
message = WORKLOCK_AGREEMENT.format(refund_rate=prettify_eth_amount(bidder.worklock_agent.get_bonus_refund_rate()),
end_date=maya.MayaDT(bidder.economics.bidding_end_date).local_datetime(),
bidder_address=bidder.checksum_address,
duration=bidder.economics.worklock_commitment_duration)
emitter.echo(message)
return