-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handling an error that occurs after a deposit action #325
Conversation
In the event of an error occurring after the deposit transaction but before displaying the Success screen to the user, there is a low possibility of system issues. To address this, we will show an error screen prompting the user to retry. If the error is episodal, the system will recover, and upon pressing the "Retry" button, the user will see the Success screen, continuing the flow as usual. We intentionally omit a close button, guiding the user to proceed within the flow and preventing abandonment.
✅ Deploy Preview for acre-dapp-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
If the user chooses not to retry, a message will inform them that we will automatically retry after a designated time ("x" duration).
f01bb0e
to
17be267
Compare
- functions should be outside the component - functions should not be exported
d56e30f
to
c7b6db9
Compare
<TextMd color="red.400">Partial Outage</TextMd> | ||
</Flex> | ||
<Button | ||
// TODO: Use a loading button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be updated after the merge #313
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not block this PR and update this part of the code when #313 is merged.
setIsLoading(true) | ||
await handleStake() | ||
setIsLoading(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useLoading
hook will be created in the #327
dapp/src/components/TransactionModal/ActiveStakingStep/StakingErrorModal/RetryModal.tsx
Outdated
Show resolved
Hide resolved
dapp/src/components/TransactionModal/ActiveStakingStep/StakingErrorModal/ServerErrorModal.tsx
Outdated
Show resolved
Hide resolved
dapp/src/components/TransactionModal/ActiveStakingStep/StakingErrorModal/index.tsx
Outdated
Show resolved
Hide resolved
d2035b0
to
5f37071
Compare
The modal content components have been moved to a separate folder. This will simplify the logic of the export
After separating the `content` directory for modals, there was a problem with cycle dependencies. Therefore, all files were moved to a higher directory. This solves the problem with dependencies. In addition, it simplifies the directory structure. However, if we find a new approach in the near future we can easily update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it looks good, I guess we can simplify the flow with modals a bit, but considering that a lot can change due to new designs, let's leave it as it is. I left some minor comments, after fix we can merge it.
dapp/src/components/TransactionModal/ActiveStakingStep/StakingErrorModal/RetryModal.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🚀
This PR adds support for potential errors occurring after the deposit transaction. To handle this, we show an error screen prompting the user to retry. If the error is episodal, upon pressing the "Retry" button, the user will see the Success screen, continuing the flow as usual. We intentionally omit a close button, guiding the user to proceed within the flow and preventing abandonment. If the user chooses not to retry, a message will inform them that we will automatically retry after a designated time - 1 minute. However, if the repeated attempt results in an error, let's show the user the information to look for help on Discord. However, the user should be able to try again from this level.
UI
Test flow recordings
Screen.Recording.2024-04-02.at.16.36.02.mov
Testing
Let's use a patch file to test. Use the following file: test.patch