Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: BigInt throws error when trying to convert number string with exponent #68

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

kallen-ledger
Copy link
Contributor

@kallen-ledger kallen-ledger commented Jul 15, 2024

Errors in sentry were noticed around the converting of an amount to its atomic unit.

This looks to only be an issue when the converted unit string has an exponent. Passing a number instead of a string seems to correctly allow the conversion of a number to a bigint while maintaining its exponent correctly.

Example issue observed on sentry:
https://ledger.sentry.io/issues/5564248559/?environment=production&project=4505868306612224&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=24h&stream_index=1

@kallen-ledger kallen-ledger merged commit 332cc3f into main Jul 15, 2024
6 checks passed
@kallen-ledger kallen-ledger deleted the bugfix/convert-to-atomic-unit-fix branch July 15, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants