interledger / interledger-rs

An easy-to-use, high-performance Interledger implementation written in Rust
http://interledger.rs
Other
201 stars 70 forks source link

fix and clean f64's normalize_scale function #713

Closed KristianWahlroos closed 3 years ago

KristianWahlroos commented 3 years ago

normalize_scale had previously some conversion problems as there was a conversion from u8 to i8. This also makes one ignored test; named calculates_with_high_asset_scale; work.

koivunej commented 3 years ago

Hmm looks like the rebase didn't go through, it's currently missing a few merges. Update your local master before rebasing to this repos master, only then do the git rebase --signoff master.

Also I failed to notice first time around that --signoff is missing. We should really get an action to verify this automatically.

Re: conventional commit "tags":

test(types): refactor f64_test refactor(types): clean fn normalize_scale for f64

The tag should also be settlement (or some abbrev like sttlmnt if it doesn't fit full) instead of types, which doesn't really reveal what's it about.

test(types): refactor f64_test

This doesn't actually refactor the test but makes the assert more lenient so perhaps the commit should reflect this? Though, refactoring would be welcome as well to have more like a "single assert per test" way, but that's not really necessary to do now.