Skip to content

refactor: update NumberUtil formatting using big.js for better precision when using big numbers with strings#4749

Merged
lukaisailovic merged 14 commits intomainfrom
enes/apkt-3174-fix-rounding-issue-in-uihelperutilformatnumbertolocalstring
Aug 1, 2025
Merged

refactor: update NumberUtil formatting using big.js for better precision when using big numbers with strings#4749
lukaisailovic merged 14 commits intomainfrom
enes/apkt-3174-fix-rounding-issue-in-uihelperutilformatnumbertolocalstring

Conversation

@enesozturk
Copy link
Copy Markdown
Contributor

Description

Updates NumberUtil formatting using Big.js for enhanced precision for big numbers with strings

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

@linear
Copy link
Copy Markdown

linear bot commented Jul 31, 2025

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 31, 2025

🦋 Changeset detected

Latest commit: c5e45a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@reown/appkit-controllers Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit Patch
@reown/appkit-common Patch
@reown/appkit-ui Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-core Patch
@reown/appkit-utils Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-wallet-button Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-universal-connector Patch
@reown/appkit-cdn Patch
@reown/appkit-testing Patch
@reown/appkit-wallet Patch
@reown/appkit-polyfills Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-basic-html ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 8:08am
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 8:08am
appkit-gallery ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 8:08am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 8:08am
10 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-example ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
appkit-basic-up-example ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
appkit-ethers5-bera ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
appkit-nansen-demo ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
appkit-vue-solana ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am
vue-wagmi-example ⬜️ Ignored (Inspect) Aug 1, 2025 8:08am

@enesozturk enesozturk changed the title Enes/apkt 3174 fix rounding issue in uihelperutilformatnumbertolocalstring refactor: update NumberUtil formatting using big.js for better precision when using big numbers with strings Jul 31, 2025
cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 31, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.68% 31851 / 40999
🔵 Statements 77.68% 31851 / 40999
🔵 Functions 69.5% 2641 / 3800
🔵 Branches 84.64% 6780 / 8010
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit/exports/constants.ts 100% 100% 100% 100%
packages/common/src/utils/NumberUtil.ts 95.74% 95.45% 77.77% 95.74% 39-40
packages/controllers/src/controllers/SwapController.ts 55.04% 79.84% 68.33% 55.04% 55-58, 187, 197-198, 228-233, 264-266, 275-276, 284-298, 327, 336-337, 345-348, 389, 396, 399-401, 408-425, 434-436, 450-451, 462-463, 482-483, 487-495, 499, 501, 503, 505, 550-559, 594-624, 628-682, 686-740, 744-745, 760-761, 777-796, 800-882, 901-902, 794-878
packages/controllers/src/utils/CoreHelperUtil.ts 73.38% 85.91% 61.62% 73.38% 30, 34, 59-60, 76, 80, 87-88, 103-104, 115, 138-139, 175, 191-192, 210-216, 225-229, 246-247, 259-267, 303-308, 316, 321, 332, 340, 342, 344-345, 355-360, 364-367, 377, 382, 387, 448, 452-456, 465-468, 471-473, 477-492, 495-520, 409-427
packages/controllers/src/utils/SwapCalculationUtil.ts 100% 92.3% 100% 100%
packages/scaffold-ui/src/partials/w3m-input-token/index.ts 92.4% 96.42% 100% 92.4% 47, 58, 66, 82, 93, 98
packages/scaffold-ui/src/partials/w3m-swap-details/index.ts 86.07% 90% 75% 86.07% 54-61, 81, 147, 183
packages/scaffold-ui/src/partials/w3m-swap-input/index.ts 85.57% 86.2% 83.33% 85.57% 82, 87-90, 94-95, 100, 102, 122, 142, 149, 158, 165, 170
packages/scaffold-ui/src/views/w3m-swap-preview-view/index.ts 77.61% 78.94% 90.9% 77.61% 69-72, 75-77, 80-94, 116, 122-124, 227, 232-233, 240-241
packages/ui/src/composites/wui-list-token/index.ts 92.3% 75% 100% 92.3% 55-56
packages/ui/src/composites/wui-token-list-item/index.ts 87.14% 82.35% 85.71% 87.14% 44-45, 99-102, 113-114, 117-118
packages/ui/src/utils/UiHelperUtil.ts 92.59% 91.66% 100% 92.59% 12, 109-110, 112-117
Generated in workflow #13910 for commit c5e45a1 by the Vitest Coverage Report Action

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@enesozturk enesozturk enabled auto-merge August 1, 2025 08:41
@enesozturk enesozturk added this pull request to the merge queue Aug 1, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 1, 2025
@enesozturk enesozturk added this pull request to the merge queue Aug 1, 2025
@lukaisailovic lukaisailovic removed this pull request from the merge queue due to a manual request Aug 1, 2025
@lukaisailovic lukaisailovic merged commit f948216 into main Aug 1, 2025
57 of 60 checks passed
@lukaisailovic lukaisailovic deleted the enes/apkt-3174-fix-rounding-issue-in-uihelperutilformatnumbertolocalstring branch August 1, 2025 09:01
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.

3 participants