Skip to content

Conversation

@hxrshxz
Copy link
Contributor

@hxrshxz hxrshxz commented Sep 22, 2025

Description

  • Made type explicit in any instance that was to any across various files
  • Added WebLNInterface and NostrInterface.
  • Added ProofEvent.
  • Made product, cart, chat, and wallet contexts better typed.
  • Fixed React Hook dependencies.
  • Memoized some helper functions. Validated dynamic form and payment data.
  • Improved type safety and IntelliSense.
  • Reduced some linter warnings with no functional change

Resolved or fixed issue

Screenshots (if applicable)

Before

image

After

image

Affirmation

For more details on what to include, see:

Bug Report Template
Feature Request Template
Documentation Issue Template
Security Issue Template

@vercel
Copy link

vercel bot commented Sep 22, 2025

@hxrshxz is attempting to deploy a commit to the shopstr-eng Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

🚨 Linting & Formatting Report

ESLint found 111 issue(s). Run npx eslint --fix locally.

  • [components/cart-invoice-card.tsx:133:64] Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
  • [components/cart-invoice-card.tsx:557:24] Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
  • [components/cart-invoice-card.tsx:630:66] Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)

…and 108 more.

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@hxrshxz hxrshxz marked this pull request as draft September 22, 2025 22:31
- Updated state types for pending payment data and fiat payment options to use more specific types (Record<string, unknown>).
- Refactored payment validation functions to improve type safety and clarity.
- Enhanced product filtering logic in DisplayProducts component using useCallback for performance optimization.
- Improved type definitions in context and cache services for better type safety and clarity.
- Added checks for Nostr extension availability in signer classes to prevent runtime errors.
- Updated user profile form to handle fiat options more robustly.
- Enhanced error handling and type definitions in fetch and helper functions.
@github-actions
Copy link

🚨 Linting & Formatting Report

ESLint found 111 issue(s). Run npx eslint --fix locally.

  • [components/cart-invoice-card.tsx:133:64] Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
  • [components/cart-invoice-card.tsx:557:24] Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)
  • [components/cart-invoice-card.tsx:630:66] Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)

…and 108 more.

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@hxrshxz hxrshxz marked this pull request as ready for review September 22, 2025 23:40
Copilot AI review requested due to automatic review settings October 6, 2025 05:39
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

Copy link

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 refactors type definitions across the codebase to improve type safety by replacing any types with more specific TypeScript types. It introduces new interfaces for WebLN and Nostr, creates a ProofEvent interface, and enhances type safety in product, cart, chat, and wallet contexts while fixing React Hook dependencies and memoizing helper functions.

  • Replaced any types with specific TypeScript interfaces throughout the codebase
  • Added WebLNInterface, NostrInterface, and ProofEvent type definitions
  • Fixed React Hook dependency arrays and memoized helper functions for performance
  • Enhanced type safety in context interfaces and form data handling

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
utils/types/types.ts Added WebLN, Nostr, and NIP44 interfaces; updated global window declarations
utils/timeout.ts Improved callback return type specificity
utils/nostr/signers/ Enhanced type safety in signer interfaces and implementations
utils/nostr/nostr-manager.ts Fixed timeout type and null check
utils/nostr/nostr-helper-functions.ts Added null safety for Nostr extension usage
utils/nostr/fetch-service.ts Updated ProofEvent type usage
utils/nostr/cache-service.ts Improved ProfileData typing in cache operations
utils/keypress-handler.ts Replaced any with string type for key events
utils/context/context.ts Added ProofEvent interface and improved context typing
pages/ Fixed React Hook dependencies and null safety checks
components/ Enhanced form data validation and type safety throughout

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@hxrshxz hxrshxz had a problem deploying to preview-deployment October 6, 2025 06:00 — with GitHub Actions Failure
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@hxrshxz hxrshxz had a problem deploying to preview-deployment October 6, 2025 07:06 — with GitHub Actions Failure
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@hxrshxz hxrshxz had a problem deploying to preview-deployment October 6, 2025 08:13 — with GitHub Actions Failure
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🚨 Linting & Formatting Report

Prettier found formatting issues. Run npx prettier --write . locally.

🔍 Please fix these before merging.

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.

1 participant