feat: add migrator button and action#3045
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 306b33c3d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (mainTxState.txHash && receivedSharesRef.current === null) { | ||
| receivedSharesRef.current = previewShares?.value ?? '0'; | ||
| } |
There was a problem hiding this comment.
Defer the received-shares snapshot until preview data exists
If the user submits the migration while useSghoVaultPreviewDeposit is still loading, this branch runs as soon as txHash is set and permanently stores '0' because previewShares is still undefined. When the preview response arrives, the ref no longer updates, so the success view can report that the user received 0 sGHO even though the migration succeeded. Consider disabling submission until the preview is ready or only snapshotting once previewShares?.value is available.
Useful? React with 👍 / 👎.
General Changes
[NOT MERGE UNTIL SDK PACKAGE INSTALLED]
PR description
Introduce UI support for the
stkGHOmigration flow.This adds a new migrate button in
StkGhoDepositRowso users with a legacystkGHOposition can start the migration directly from the stkGHO deposit row. It also updates the GHO banner logic to route users to sGHO, opening the migration modal directly when the user matches the legacy-position conditions.Developer Notes
Add any notes here that may be helpful for reviewers.
Reviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
.env.examplefile as well as the pertinant.github/actions/*files