Skip to content
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

Merged
merged 27 commits into from
Apr 12, 2024

Conversation

kkosiorowska
Copy link
Contributor

@kkosiorowska kkosiorowska commented Mar 20, 2024

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

Screenshot 2024-04-02 at 15 44 29 Screenshot 2024-04-02 at 15 49 26

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

git apply test.patch

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.

@kkosiorowska kkosiorowska self-assigned this Mar 20, 2024
Copy link

netlify bot commented Mar 20, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit 634ac12
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/6616391cae5e190008ff3b2d
😎 Deploy Preview https://deploy-preview-325--acre-dapp-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kkosiorowska kkosiorowska force-pushed the error-after-deposit-action branch from f01bb0e to 17be267 Compare March 21, 2024 15:41
@kkosiorowska kkosiorowska force-pushed the error-after-deposit-action branch from d56e30f to c7b6db9 Compare April 2, 2024 13:25
<TextMd color="red.400">Partial Outage</TextMd>
</Flex>
<Button
// TODO: Use a loading button
Copy link
Contributor Author

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

Copy link
Contributor Author

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.

@kkosiorowska kkosiorowska marked this pull request as ready for review April 2, 2024 14:47
Comment on lines +34 to +36
setIsLoading(true)
await handleStake()
setIsLoading(false)
Copy link
Contributor Author

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

@kkosiorowska kkosiorowska force-pushed the error-after-deposit-action branch from d2035b0 to 5f37071 Compare April 8, 2024 08:31
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.
@kkosiorowska kkosiorowska requested a review from ioay April 8, 2024 11:31
Copy link
Contributor

@ioay ioay left a 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/hooks/useCountdown.ts Outdated Show resolved Hide resolved
dapp/src/utils/numbers.ts Outdated Show resolved Hide resolved
@kkosiorowska kkosiorowska requested a review from ioay April 10, 2024 07:01
Copy link
Contributor

@ioay ioay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

@kkosiorowska kkosiorowska enabled auto-merge April 12, 2024 09:39
@kkosiorowska kkosiorowska merged commit d742627 into main Apr 12, 2024
20 checks passed
@kkosiorowska kkosiorowska deleted the error-after-deposit-action branch April 12, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants