Skip to content

[renter setallowance] Fix default expected upload/download values

Marcin S. requested to merge expected-upload-download into master

MERGE REQUEST

Overview

This fixes a bug in siac renter setallowance.

The expected download/upload was showing 0 when setting an allowance without an existing allowance:

Screen_Shot_2020-03-05_at_15.58.03

The problem was that the monthly rate was being multiplied by the wrong period - the period in the current allowance, which in this case didn't exist and was 0. The correct period is the default one.

We also were not normalizing based on the potentially custom period set in step 2.

Example for Visual changes (ie Screenshot)

Screen_Shot_2020-03-06_at_16.52.11

https://asciinema.org/a/gQxHViMZKP0OtkJzgvtzwOlsL

Showing that the displayed values match the final values even when we change the period:

https://asciinema.org/a/ZkBzFr7UcQxmlbqaMbX7Cr2fl

Issues Closed

#3833 (closed)

Checklist

Review and complete the checklist to ensure that the MR is complete before assigned to an approver.

  • All new methods, or updating methods have clear docstrings
  • Testing added or updated for new methods
  • Any new packages are added to Makefile and .gitlab-ci.yml
  • API documentation updated for API updates
  • Module README.md updated for changes to work flow
  • Issue added to Sia-UI repo for new supporting features
  • Changelog updated
Edited by Marcin S.

Merge request reports