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

ETH <> Gwei <> Wei - double -> decimal #188

Merged
merged 1 commit into from
May 17, 2024
Merged

Conversation

0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented May 17, 2024

Avoid floating point errors


PR-Codex overview

The focus of this PR is to update numeric data types from double to decimal for more precise calculations in Ethereum-related functionalities.

Detailed summary

  • Changed double to decimal for maxPriorityFee and maxFee in GasStationResult class
  • Updated DECIMALS_18 constant to decimal
  • Converted numeric calculations from double to decimal in various utility methods for Ethereum conversions

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Avoid floating point errors
Copy link

Test Results for Android

  1 files  ±0  15 suites  ±0   9m 56s ⏱️ + 1m 23s
 96 tests ±0  94 ✅  - 2  0 💤 ±0  2 ❌ +2 
100 runs  ±0  98 ✅  - 2  0 💤 ±0  2 ❌ +2 

For more details on these failures, see this check.

Results for commit 51cc2a9. ± Comparison against base commit 3c17230.

Copy link

Test Results for WebGL

  1 files  ±0  15 suites  ±0   10m 3s ⏱️ + 2m 6s
 96 tests ±0  94 ✅  - 2  0 💤 ±0  2 ❌ +2 
100 runs  ±0  98 ✅  - 2  0 💤 ±0  2 ❌ +2 

For more details on these failures, see this check.

Results for commit 51cc2a9. ± Comparison against base commit 3c17230.

Copy link

Test Results for StandaloneLinux64

  1 files  ±0  15 suites  ±0   10m 47s ⏱️ + 3m 32s
 96 tests ±0  94 ✅  - 2  0 💤 ±0  2 ❌ +2 
100 runs  ±0  98 ✅  - 2  0 💤 ±0  2 ❌ +2 

For more details on these failures, see this check.

Results for commit 51cc2a9. ± Comparison against base commit 3c17230.

Copy link

Test Results for iOS

  1 files  ±0  15 suites  ±0   12m 36s ⏱️ + 5m 27s
 96 tests ±0  93 ✅  - 3  0 💤 ±0  3 ❌ +3 
100 runs  ±0  97 ✅  - 3  0 💤 ±0  3 ❌ +3 

For more details on these failures, see this check.

Results for commit 51cc2a9. ± Comparison against base commit 3c17230.

@0xFirekeeper 0xFirekeeper merged commit bb82aea into main May 17, 2024
5 of 13 checks passed
@0xFirekeeper 0xFirekeeper deleted the firekeeper/decimal-eth branch May 17, 2024 18:05
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.

1 participant