Skip to content

feat(pay): Copy Address/Amount component + Confirm Payment Sent button#69

Merged
codebestia merged 2 commits into
ShadeProtocol:mainfrom
pre-cious-Igwealor:fix/precious-copy-confirm-payment
May 30, 2026
Merged

feat(pay): Copy Address/Amount component + Confirm Payment Sent button#69
codebestia merged 2 commits into
ShadeProtocol:mainfrom
pre-cious-Igwealor:fix/precious-copy-confirm-payment

Conversation

@pre-cious-Igwealor
Copy link
Copy Markdown
Contributor

Summary

  • closes Create "Copy Address & Amount" Component #55 — new CopyReadonlyInput (in src/components/pay/copy-readonly-input.tsx) renders a read-only input + a one-click copy icon. Two instances live in the manual-transfer view (Address + Amount). aria-label flips to " copied to clipboard" for ~1.5s post-copy so users see the action confirm without a toast layer. Falls back to select + execCommand when navigator.clipboard isn't available.
  • closes Create "Confirm Payment Sent" Button #56 — primary "I have sent the payment" button at the bottom of the manual-transfer panel (in src/components/pay/pay-manual-transfer-view.tsx). On click enters an aria-busy loading state with a spinner + "Verifying on the blockchain…" copy until the parent's onConfirmSent promise resolves.
  • wired into pay-tabs.tsx — the manual-transfer tab was previously a placeholder string.

Notes

  • I could not run pnpm dev / vitest locally in the build sandbox; CI is the source of truth.
  • Defaults for address / amount are obvious placeholders so the panel renders cleanly in Storybook / route previews; callers pass real values via props once the create-invoice flow lands them.

Test plan

  • Manual: navigate to /pay → Manual transfer tab; click both copy buttons → values appear in the clipboard, icon flips to ✓ for ~1.5s.
  • Manual: click "I have sent the payment" → button shows spinner + verifying copy.
  • Manual: keyboard-only — Tab through both copy buttons + the confirm button; all reachable.

Closes ShadeProtocol#55 — new `CopyReadonlyInput` renders a read-only input + a
one-click copy-to-clipboard icon button. Two instances live inside
the manual transfer view (Address + Amount). aria-label flips to
"<field> copied to clipboard" for ~1.5s after a successful copy so
users see the action confirm without needing a toast layer. Falls
back to select + execCommand when navigator.clipboard isn't
available (older Safari / insecure contexts).

Closes ShadeProtocol#56 — primary "I have sent the payment" button at the bottom
of the manual-transfer panel. On click enters an aria-busy loading
state with a spinner + "Verifying on the blockchain…" copy until the
parent's onConfirmSent promise resolves; with no handler attached the
button auto-releases after a short delay so the unconnected preview
doesn't look hung.

Wired into pay-tabs.tsx — the manual-transfer panel was previously a
placeholder "Manual transfer instructions will appear here." string.
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@pre-cious-Igwealor Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

- Regenerated package-lock.json so `npm ci` resolves cross-platform
  optional deps (the previous lockfile was missing typescript@4.9.5 and
  utf-8-validate@5.0.10 entries that `@twind/*` transitively pulls in).
- Ran Prettier on the three files this PR added/changed under
  `src/components/pay/`. Other format:check warnings in the repo are
  pre-existing on main and out of this PR's scope.

Done with AI assistance, as previously disclosed on this PR.
Copy link
Copy Markdown
Contributor

@codebestia codebestia left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks

@codebestia codebestia merged commit 456d4ad into ShadeProtocol:main May 30, 2026
1 check failed
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.

Create "Confirm Payment Sent" Button Create "Copy Address & Amount" Component

2 participants