-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore: add support for fiat use in tron staking/unstaking flows #23664
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
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
…tamask-mobile into NWNT-766-support-fiat-values
app/components/UI/Earn/hooks/useMultichainInputHandlers.test.ts
Outdated
Show resolved
Hide resolved
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe changes are specifically focused on the Earn/Staking functionality:
All changes are well-contained within the Earn/Staking module with comprehensive unit tests. The risk is medium because:
The |
|



Description
Fixes incorrect fiat values for Tron (non-EVM chains) in stake/unstake input views by using multichain asset rates instead of EVM-based conversion rates. It uses uses selectMultichainAssetsRates to get the correct token to fiat rate for the non-EVM chains.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds multichain (non‑EVM) fiat conversion support to Earn input/withdraw flows via a new hook and updates analytics to correctly format chain IDs.
useMultichainInputHandlersto compute fiat/token amounts and toggle values for non‑EVM chains usingselectMultichainAssetsRatesandisNonEvmChainId.useEarnInputanduseEarnWithdrawInput; preserve typed fiat, clear on mode changes/quick amounts/max, and compute balance values with multichain rates.clearNonEvmTypedFiatValueand use inhandleMax.formatChainIdForAnalyticsutil and use it in currency switch events inEarnInputViewandEarnWithdrawInputView.useInput.useMultichainInputHandlers.test, expanded earn input/withdraw tests) and update mocks for multichain rates.en.json.Written by Cursor Bugbot for commit bdc489b. This will update automatically on new commits. Configure here.