updateWeight

abstract fun updateWeight(newWeight: HDWeight, oldWeight: HDWeight, precision: Int? = null): Completable

Update existing weight.

If updated weight is less or equal than current active goal weight than the goal will be updated to GoalStatus.REACHED status.

Weight must be between ValidatorTool.WEIGHT_BOTTOM and ValidatorTool.WEIGHT_TOP. If weight is out of this bounds than IllegalArgumentException will be emitted.

precision will be used to round newWeight and check does it complete weight goal.

Return

Completable that completes when weight is updated

Parameters

newWeight

changed weight

oldWeight

weight before changing

precision

count of significant digits after point (optional)