Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the
src/config/data/ccip/utils.tsfile to replaceBigNumber.jswithethers.jsfor handling large number formatting and conversions. The changes simplify the codebase and improve precision in formatting token values and rates. Below are the most important changes:Removal of
BigNumber.jsand adoption ofethers.jsnormalizeNumberutility function, which usedBigNumber.jsfor decimal normalization, and replaced its functionality withethers.js'sformatUnitsmethod for precise and modern handling of large numbers. ([[1]](https://github.com/smartcontractkit/documentation/pull/2765/files#diff-479c37d0bd4d99190fb1ecc4bb36ae338e0db8caa7cd2f7b3da63daec1e959d4L119-L125),[[2]](https://github.com/smartcontractkit/documentation/pull/2765/files#diff-479c37d0bd4d99190fb1ecc4bb36ae338e0db8caa7cd2f7b3da63daec1e959d4R150-R189))displayCapacityfunction to useethers.js'sformatUnitsfor converting token capacities with decimals, ensuring cleaner and more accurate formatting. ([src/config/data/ccip/utils.tsR150-R189](https://github.com/smartcontractkit/documentation/pull/2765/files#diff-479c37d0bd4d99190fb1ecc4bb36ae338e0db8caa7cd2f7b3da63daec1e959d4R150-R189))displayRatefunction to useethers.js'sformatUnitsfor rate and capacity conversions, improving readability and precision. ([src/config/data/ccip/utils.tsR150-R189](https://github.com/smartcontractkit/documentation/pull/2765/files#diff-479c37d0bd4d99190fb1ecc4bb36ae338e0db8caa7cd2f7b3da63daec1e959d4R150-R189))Code cleanup and modernization
BigNumber.jsand added theformatUnitsimport fromethers.jsto streamline dependencies. ([src/config/data/ccip/utils.tsL5-R6](https://github.com/smartcontractkit/documentation/pull/2765/files#diff-479c37d0bd4d99190fb1ecc4bb36ae338e0db8caa7cd2f7b3da63daec1e959d4L5-R6))displayCapacityanddisplayRateby cleaning up trailing zeros and unnecessary decimal points for better user readability. ([src/config/data/ccip/utils.tsR150-R189](https://github.com/smartcontractkit/documentation/pull/2765/files#diff-479c37d0bd4d99190fb1ecc4bb36ae338e0db8caa7cd2f7b3da63daec1e959d4R150-R189))