Skip to content

[READY] Integrate SigningBox into RampSummaryDialog#644

Merged
Sharqiewicz merged 11 commits into
stagingfrom
616-improve-the-cta-for-wallet-txn
May 21, 2025
Merged

[READY] Integrate SigningBox into RampSummaryDialog#644
Sharqiewicz merged 11 commits into
stagingfrom
616-improve-the-cta-for-wallet-txn

Conversation

@Sharqiewicz
Copy link
Copy Markdown
Member

@Sharqiewicz Sharqiewicz commented May 15, 2025

  • remove SigningBox
  • integrate SigningBox content with RampSummaryDialog
  • integrate react-toastify with Popover API

@Sharqiewicz Sharqiewicz linked an issue May 15, 2025 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2025

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit 9646b9d
🔍 Latest deploy log https://app.netlify.com/projects/pendulum-pay/deploys/682c965dc4dd1f000849e6e7
😎 Deploy Preview https://deploy-preview-644--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 project configuration.

@Sharqiewicz
Copy link
Copy Markdown
Member Author

@ebma As discussed, I have implemented a solution integrating react-toastify with the Popover API. I also detailed this solution in the relevant react-toastify discussion here: fkhadra/react-toastify#959

@Sharqiewicz Sharqiewicz requested review from a team and Copilot May 16, 2025 14:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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,
Copy link

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

ToastMessage.SIGNING_REJECTED appears in the dependency array; if it is a constant value, consider removing it to avoid unnecessary effect re-runs.

Suggested change
ToastMessage.SIGNING_REJECTED,

Copilot uses AI. Check for mistakes.
@Sharqiewicz Sharqiewicz changed the title integrate SigningBox into RampSummaryDialog [READY] Integrate SigningBox into RampSummaryDialog May 16, 2025
Copy link
Copy Markdown
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

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.

@Sharqiewicz
Copy link
Copy Markdown
Member Author

@ebma Good catch, it's fixed now!

Copy link
Copy Markdown
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍 Can confirm the bug with the toast is fixed.

@Sharqiewicz Sharqiewicz merged commit b388f58 into staging May 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the CTA for wallet txn

3 participants