fix: 1:10 split#173
Conversation
✅ Deploy Preview for lifted-alberto ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the token migration ratio from 1:100 to 1:10 and aligns the validation rules and user-facing text to match the new ratio.
- Modified the migration ratio text in both the terms and conditions and the form step from 1:100 to 1:10
- Adjusted validation logic: raised the minimum token amount from 1e-8 to 1e-7 and reduced allowable decimal places from 8 to 7
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/features/token-migration/components/migration-form/terms-and-conditions.tsx | Replaced “1-for-100” with “1-for-10” in the migration terms |
| src/features/token-migration/components/migration-form/amount-asset-step.tsx | Updated validation thresholds (1e-8 → 1e-7, 8 → 7 decimals) and ratio examples |
Comments suppressed due to low confidence (2)
src/features/token-migration/components/migration-form/amount-asset-step.tsx:80
- [nitpick] The error message uses scientific notation (1e-7), which can be unclear to end users—consider displaying '0.0000001' to match the examples and improve readability.
"Amount must be greater than 1e-7 and less than or equal to your balance",
src/features-token-migration/components/migration-form/amount-asset-step.tsx:79
- Add or update unit tests to cover the new minimum amount (1e-7) and decimal place limit (7) to verify the adjusted validation logic.
.test(
"is-amount-in-range",
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #173 +/- ##
=======================================
Coverage 45.61% 45.61%
=======================================
Files 122 122
Lines 3229 3229
Branches 897 897
=======================================
Hits 1473 1473
Misses 1741 1741
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request includes updates to the token migration logic and associated user-facing text to reflect a change in the token migration ratio and validation rules. The most important changes include modifying the migration ratio from 1:100 to 1:10, adjusting validation thresholds for token amounts, and updating the terms and conditions to align with the new ratio.
Updates to token migration ratio:
src/features/token-migration/components/migration-form/amount-asset-step.tsx: Updated the migration ratio in the user-facing text from 1:100 to 1:10. This includes changes to the description of how tokens will be adjusted during migration and examples of token conversions.src/features/token-migration/components/migration-form/terms-and-conditions.tsx: Updated the terms and conditions to reflect the new 1:10 migration ratio, replacing the previous 1:100 ratio in multiple sections. [1] [2]Validation rule adjustments:
src/features/token-migration/components/migration-form/amount-asset-step.tsx: Adjusted the minimum token amount validation threshold from1e-8to1e-7and reduced the maximum allowed decimal places from 8 to 7. These changes ensure consistency with the new migration ratio and token handling rules.