pendulum-chain / vortex

1 stars 0 forks source link

Stop flow early if user changes the offramping amount on anchor UI #154

Closed ebma closed 1 week ago

ebma commented 2 weeks ago

Stops the offramping process if the amount that the user entered in the KYC page doesn't match the one we expect. Shows an error notification with the text "Mismatching offramp amounts detected. Please restart the offramp process.". To progress, the user can simply click on the "Confirm" and "Start offramping" buttons again to open a new KYC page and retry the process. The toast is only shown for a limited time but the timer only starts running once the user is back on the page of the prototype so there is no chance that the user misses the notification entirely.

The helper functions for the toast notifications is adopted from the portal here.

Closes #129.

netlify[bot] commented 2 weeks ago

Deploy Preview for pendulum-pay ready!

Name Link
Latest commit db93671882afef170567ae7f0baf26615831edc1
Latest deploy log https://app.netlify.com/sites/pendulum-pay/deploys/66ed3469f642c20008dc1082
Deploy Preview https://deploy-preview-154--pendulum-pay.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.

ebma commented 2 weeks ago

@pendulum-chain/devs and @pendulum-chain/product please review

github-actions[bot] commented 2 weeks ago

yarn.lock changes

Click to toggle table visibility
| Name | Status | Previous | Current | | :- | :-: | :-: | :-: | | `clsx` | [UPDATED](#) | 2.1.0 | 2.1.1 | | `react-toastify` | [ADDED](#) | - | 10.0.5 |
ebma commented 1 week ago

I think having access to the toast notifications is convenient, also for us during the development. Otherwise, we would need to manage the state of the error in the offramp-process and this way it's fire-and-forget.

I can also change it to a simple message of course. Maybe we should ask the @pendulum-chain/product: Would you favor a 'permanent' message showing above the 'Confirm' button on the screen or the red toast notification that is shown in the current deploy preview?

vadaynujra commented 1 week ago

@ebma the toast notification works well, as it only appears when the user comes back to the app.