-
Notifications
You must be signed in to change notification settings - Fork 390
feat: manual control pos-client #939
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
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.
Pull Request Overview
This PR updates multiple dependencies and introduces manual control functionality for payment requests in the POS dApp. The changes include updating the @reown/appkit and @walletconnect/pos-client packages, along with numerous transitive dependency updates in the lockfile, and implementing a manual payment control feature in the UI.
Key Changes
- Updated
@reown/appkitfrom1.8.2to1.8.12and@walletconnect/pos-clientfrom0.0.0-canary.1to0.0.0-canary.4 - Added manual control toggle for payment requests with state management and persistence
- Modified event handler signatures to match updated SDK (destructured parameters)
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| package.json | Updated core dependencies for POS client and AppKit SDK |
| yarn.lock | Dependency version updates and transitive dependency changes |
| src/app/page.tsx | Added manual control feature, fixed event handler signatures, improved state management |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| // Check for saved manual mode state | ||
| const savedManualMode = localStorage.getItem("isManualMode"); |
Copilot
AI
Oct 30, 2025
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.
Inconsistent localStorage key: saving as 'isManualControl' (line 466) but reading as 'isManualMode'. This will prevent the manual mode preference from persisting correctly across page reloads.
| const savedManualMode = localStorage.getItem("isManualMode"); | |
| const savedManualMode = localStorage.getItem("isManualControl"); |
| const handleManualModeToggle = () => { | ||
| const newValue = !isManualControl; | ||
| setIsManualControl(newValue); | ||
| localStorage.setItem("isManualControl", String(newValue)); |
Copilot
AI
Oct 30, 2025
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 function should clear the hasRequestsSent state when toggling manual mode. If a user switches from manual to automatic mode after sending requests, the state should reset to allow proper functionality if they switch back.
| localStorage.setItem("isManualControl", String(newValue)); | |
| localStorage.setItem("isManualControl", String(newValue)); | |
| setHasRequestsSent(false); |
| {isManualControl && isWalletConnected && ( | ||
| <button | ||
| onClick={handleSendRequestsToWallet} | ||
| disabled={hasRequestsSent} |
Copilot
AI
Oct 30, 2025
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 button lacks an aria-label or accessible text when disabled. Consider adding aria-label=\"Send payment requests to wallet\" to improve screen reader support.
| disabled={hasRequestsSent} | |
| disabled={hasRequestsSent} | |
| aria-label="Send payment requests to wallet" |
No description provided.