Merged
Conversation
…te before next tx (#11823) * fix: show correct token symbol for unstake/exit approval labels For exit actions on liquid staking yields (Lido stETH, Rocket Pool rETH, etc.), the approval and unstake steps were incorrectly showing the input token symbol (e.g., "Approve ETH") instead of the receipt/output token (e.g., "Approve stETH"). This is because during unstaking, you approve the receipt token for the withdrawal contract. Adds resolveAssetSymbolForTx() to determine the correct display symbol based on transaction type and action direction, and updates YieldForm, YieldManager, and useYieldTransactionFlow to use it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: wait for on-chain receipt between multi-step yield transactions After broadcasting the first tx in a multi-step flow (e.g., Approval → Unstake), the code only waited for the yield.xyz API to acknowledge the tx (status != Created), then immediately signed the next tx. Since the chain nonce hadn't incremented yet (first tx still pending on-chain), the second tx failed with "transaction replacement underpriced". Add viem's waitForTransactionReceipt after broadcasting non-final EVM transactions to ensure the chain nonce has incremented before proceeding to the next step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: minor code simplifications in yield utils and form - Move assertNever before first usage for top-to-bottom readability - Use idiomatic `return assertNever()` pattern for exhaustive switch - Fix outputTokenAsset selector to use outputTokenAssetId directly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use input token denomination for yield exit form amounts The yield.xyz API returns balances and expects amounts in the underlying/ input token (AVAX, ETH), not the receipt token (sAVAX, rETH). For pricePerShare tokens where 1 receipt > 1 underlying, this caused a visible amount mismatch. Separate display concerns: input area (icon, symbol, precision, market data) uses input token, while button/title text keeps receipt token to describe the user action. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use provider-based heuristic for rebasing vs pricePerShare tokens The yield.xyz v1 API doesn't expose pricePerShareState, so discriminate rebasing tokens (stETH/Lido) from pricePerShare tokens (sAVAX, rETH, mETH) using providerId. Non-rebasing liquid staking tokens now consistently show the underlying/input token (AVAX, ETH) across the entire exit form, while rebasing tokens (stETH) correctly show the receipt token in labels/headings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: show correct token symbol for unstake approval labels Approval steps on yield exit now show the actual receipt token being approved (rETH, stETH, sAVAX) instead of the native asset. Native assets like ETH/AVAX can't be ERC-20 approved — the approval always targets the receipt token contract. Also reverts unnecessary rebasing/pricePerShare display logic, keeping the changeset minimal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract approval tx types into Set constant Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: asset-generation-bot <action@github.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The userback widget CSP introduced an explicit font-src directive, which prevents the browser from falling back to default-src for fonts. This caused all Inter fonts from rsms.me to be blocked by CSP on deployed environments (app, release, private.shapeshift.com). Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat: rfox v3 reward distribution update (#11836)
feat: regenerate asset data 02/12/2026 (#11838)
fix: remove sourcemaps from cloudflare deploy (#11850)
feat: move hdwallet into web as workspace packages (#11811)
feat: regenerate asset data 02/11/2026 (#11830)
fix: honour asset page context for QR code scans (#11802)
feat: enabling userback widget to replace canny (#11775)
feat: enable butter btc routes (#11806)
feat: ton tx parsing follow-ups (#11805)
fix: yield correct symbol for approve rows + wait for on-chain complete before next tx (#11823)