[READY] Integrate SigningBox into RampSummaryDialog#644
Conversation
✅ Deploy Preview for pendulum-pay ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@ebma As discussed, I have implemented a solution integrating |
There was a problem hiding this comment.
Pull Request Overview
This PR integrates the SigningBox functionality into the RampSummaryDialog, updating the user-signing flow and associated UI components.
- Updated wagmiConfig with theme settings and wallet configurations.
- Replaced the legacy SigningBox component with a new hook (useSigningBoxState) and modular SigningBoxContent/SigningBoxButton components.
- Upgraded react-toastify and integrated ToastPopover in the app layout.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/wagmiConfig.ts | Added new theme and wallet configuration settings. |
| frontend/src/pages/ramp-form/index.tsx | Reordered and updated import statements; removed legacy SigningBox usage. |
| frontend/src/hooks/useSigningBoxState.ts | Introduced a new hook to manage signing box state and progress. |
| frontend/src/hooks/offramp/useRampService/useRegisterRamp.ts | Added toast notifications for signing rejections in the ramp registration process. |
| frontend/src/components/ToastPopover/index.tsx | New component wrapping the ToastContainer using a Popover wrapper. |
| frontend/src/components/SigningBox/* | Removed legacy SigningBox implementation and introduced split SigningBoxContent/Button. |
| frontend/src/components/RampSummaryDialog/index.tsx | Integrated signing box UI into the ramp summary dialog based on signing state. |
| frontend/src/Popover/index.tsx | New Popover component to handle custom popover behavior. |
| frontend/src/app.tsx | Replaced ToastContainer with the new ToastPopover component. |
| frontend/package.json | Updated react-toastify dependency version. |
| setSigningRejected, | ||
| showToast, | ||
| signingRejected, | ||
| ToastMessage.SIGNING_REJECTED, |
There was a problem hiding this comment.
ToastMessage.SIGNING_REJECTED appears in the dependency array; if it is a constant value, consider removing it to avoid unnecessary effect re-runs.
| ToastMessage.SIGNING_REJECTED, |
ebma
left a comment
There was a problem hiding this comment.
Code looks good to me, I can also confirm that the toast is shown on the top layer 🚀
I noticed a bug though. The toast is fired again and again. You can reproduce it by doing the following:
- Go to the 'Sell' view
- Enter some amount and necessary details to open the ramp summary dialog
- Confirm and get the request for signing in your wallet
- Reject the signing request
Now, the "Request cancelled" toast will be shown again and again at the top right-hand corner.
|
@ebma Good catch, it's fixed now! |
ebma
left a comment
There was a problem hiding this comment.
Looks good to me 👍 Can confirm the bug with the toast is fixed.
react-toastifywith Popover API