Skip to content

Conversation

@r-near
Copy link
Collaborator

@r-near r-near commented Feb 3, 2026

Summary

Addresses feedback from PR #450 review.

Changes

  1. Fixed text/example mismatch: Intro now correctly describes wNEAR→Ethereum (matches the code example)
  2. Fixed math error: Corrected 10^17 / 10^6 = 10^11 = 100000000000 (was missing a zero)
  3. Clarified WETH Solana decimals: Added footnote explaining WETH uses 8 decimals (Wormhole standard), while Omni Bridge-deployed tokens cap at 9

@r-near r-near requested review from a team as code owners February 3, 2026 18:30
Copilot AI review requested due to automatic review settings February 3, 2026 18:30
@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

⚠️ No Changeset found

Latest commit: 43211f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the “Decimal Normalization” documentation to address review feedback by correcting token decimal examples and clarifying Solana-specific decimals.

Changes:

  • Adjusted the decimals table (WETH Solana decimals + note, simplified wNEAR “capped” wording).
  • Updated the “Dust Problem” example to describe wNEAR bridging NEAR → Ethereum and corrected the conversion math.
Comments suppressed due to low confidence (1)

docs/core-concepts/decimals.mdx:43

  • This “Dust Problem” example doesn’t actually show rounding/dust: 0.0000001 wNEAR (10^17 in 24 decimals) converts exactly to 100000000000 in 18 decimals, so nothing “disappears during conversion.” Either adjust the example to use an amount that rounds down to 0 (or loses precision) when converting 24→18, or reword the surrounding text to match the fact that the failure here is purely due to fees/minimums rather than rounding.
```typescript
// wNEAR bridged to Ethereum: 24 decimals → 18 decimals
// On NEAR: 0.0000001 wNEAR = 100000000000000000 (24 decimals)
// Converted to Ethereum: 100000000000 (18 decimals) = 0.0000001 wNEAR
// If amount after fees is too small, transfer fails

This is called "dust" — amounts so small they disappear during conversion.

How the SDK Protects You

</details>



---

💡 <a href="/Near-One/bridge-sdk-js/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

- Fix text/example mismatch in dust problem section
- Fix math error (10^17 / 10^6 = 10^11)
- Update token table with verified real-world data
- Add ZEC as example of token under max (8 decimals)
@r-near r-near force-pushed the fix/docs-decimal-feedback branch from f3700c4 to 43211f1 Compare February 3, 2026 18:35
@Near-One Near-One deleted a comment from Copilot AI Feb 3, 2026
@Near-One Near-One deleted a comment from Copilot AI Feb 3, 2026
@r-near r-near merged commit 0c7223e into main Feb 3, 2026
2 checks passed
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