Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix: parse_units was generating an error on some values #701

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

x3ccd4828
Copy link
Contributor

@x3ccd4828 x3ccd4828 commented Dec 17, 2021

Motivation

parse_units was generating an error on some values because of extra decimal places when multiplying by 10^decimals

Solution

added round before converting to U256 to prevent error

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

…tra decimal places added round to prevent error
Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch - ty

@gakonst gakonst merged commit 6cecc48 into gakonst:master Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants