Repository navigation
fix(wormhole): parse --amount exactly, not via f64 - #187
Open
Iamsohungrynow wants to merge 1 commit into
Open
Iamsohungrynow wants to merge 1 commit into
Iamsohungrynow wants to merge 1 commit into
Conversation
The wormhole commands still read --amount (and dissolve's --target-size) as f64 and converted with (amount * 1_000_000_000_000.0) as u128, so `dissolve --amount 4.35` moved 4.34 DEV (2.01 and 16.4 lost 0.01 too), and nan, -1 and inf were accepted as 0, 0 and u128::MAX. They now go through send::parse_amount_with_decimals when clap parses them, like multisig since Quantus-Network#179; the SCALE_DOWN_FACTOR alignment is unchanged. The exercise scenario now passes its multiround amount in raw units.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
follow-up to #179: wormhole still parsed
--amountand--target-sizeas f64, sodissolve --amount 4.35moved 4.34 DEV andnan,-1,infgot through. they now go throughsend::parse_amount_with_decimalslike multisig, with regression tests