Skip to content

Conversation

@rodrigopavezi
Copy link
Member

@rodrigopavezi rodrigopavezi commented Nov 15, 2024

Fixes #146

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced invoice creation to support encrypted requests.
    • Added checkbox input for encrypting invoices in the invoice form.
    • Introduced a toggle switch for managing encrypted request visibility in the dashboard.
    • Launched a new toggle switch component for improved accessibility and usability.
  • Bug Fixes

    • Corrected typo in transaction confirmation error message.
  • Improvements

    • Updated invoice view component for safer property access.
    • Expanded form data structure to include an isEncrypted property.
    • Enhanced input component to support checkbox functionality.
    • Improved handling of default currencies based on network selection.
    • Updated dependency versions for improved compatibility and performance.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 15, 2024

Warning

Rate limit exceeded

@rodrigopavezi has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 195c2cb and 012e6bf.

Walkthrough

The pull request introduces several enhancements to the invoice creation process across multiple components. Key modifications include the addition of encryption support in the create-invoice-form.svelte component, which now checks for an isEncrypted flag and constructs appropriate request objects. The resetForm.ts file has been updated to initialize this new property. The invoice-view.svelte component has improved property access safety using optional chaining. Additionally, the input.svelte component has been enhanced to support checkbox inputs, and the CustomFormData interface has been updated to include the isEncrypted property.

Changes

File Path Change Summary
packages/create-invoice-form/src/lib/create-invoice-form.svelte Enhanced submitForm to support encrypted requests; added EncryptionTypes; corrected error message; updated defaultCurrencies handling.
packages/create-invoice-form/src/lib/utils/resetForm.ts Added isEncrypted property initialized to false in getInitialFormData.
packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte Implemented optional chaining for safe property access in request?.contentData.
shared/components/input.svelte Added support for checkbox inputs with new checked and handleCheckbox properties.
shared/types/index.ts Updated CustomFormData interface to include optional isEncrypted property.
packages/invoice-dashboard/src/lib/view-requests.svelte Added toggle functionality for encrypted requests with new properties and improved layout.
packages/create-invoice-form/src/lib/invoice/form.svelte Added checkbox input for encrypting invoices, binding to formData.isEncrypted.
shared/components/switch.svelte Introduced a toggle switch component with customizable properties for enhanced user interaction.
packages/create-invoice-form/package.json Updated dependency versions for @requestnetwork/data-format and @requestnetwork/request-client.js.
packages/invoice-dashboard/package.json Updated dependency versions for @requestnetwork/payment-detection, @requestnetwork/payment-processor, and @requestnetwork/request-client.js.
packages/payment-widget/package.json Updated dependency versions for @requestnetwork/payment-processor, @requestnetwork/request-client.js, and @requestnetwork/web3-signature.

Assessment against linked issues

Objective Addressed Explanation
Add encryption support to the invoicing template (#146)

Possibly related PRs

  • feat: added pdf download #94: The changes in the main PR enhance the create-invoice-form.svelte component, which is directly related to the modifications in the invoice-view.svelte and view-requests.svelte components that involve handling invoice data and improving user interaction with invoice downloads.
  • feat: implement the invoicing format #101: The main PR introduces support for encrypted requests in the invoice creation process, which is relevant to the changes in the payment-widget component that enhance payment processing and invoice management.
  • feat: Add better loading skeleton on Invoice Dashboard #206: The updates to the view-requests.svelte component in the main PR align with the changes made to improve loading states and user experience in the invoice dashboard.
  • Form invoice info fix #225: The changes in the main PR regarding the handling of invoice data and user inputs are related to the updates made to the create-invoice-form component, which also focuses on improving the user experience during invoice creation.
  • fix: Settlement currencies filtering #226: The filtering of settlement currencies in the main PR is directly connected to the changes made in the create-invoice-form component, which enhances the management of currency selection based on user inputs.

Suggested reviewers

  • aimensahnoun
  • MantisClone
  • sstefdev

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (11)
shared/types/index.ts (1)

20-20: Add documentation for the encryption flag.

The isEncrypted property looks good, but consider adding JSDoc comments to explain its purpose, security implications, and relationship with the encryption feature.

+  /** 
+   * Indicates whether the invoice data should be encrypted.
+   * When true, sensitive data will be encrypted using the recipient's public key.
+   */
   isEncrypted?: boolean;
shared/components/input.svelte (3)

23-24: Consider consistent label pattern across input types

The label pattern differs between checkbox and text inputs. Consider using a consistent approach for better maintainability.


42-53: Enhance accessibility and event handling

A few suggestions to improve this section:

  1. Add aria attributes for better accessibility
  2. Consider using onChange instead of onClick for checkbox state changes

Consider applying these improvements:

 <label for={id} class="input-label">
   <input
     {id}
     type="checkbox"
     checked={checked}
     {disabled}
+    aria-checked={checked}
+    role="checkbox"
     class={`checkbox-input ${className} ${error ? "input-error" : ""}`}
-    on:click={handleCheckbox}
+    on:change={handleCheckbox}
   />
   {label}
 </label>

142-145: Enhance checkbox styling

Consider these improvements to the checkbox styling:

  1. Extract the accent color to a CSS variable for consistency
  2. Add hover and focus states for better UX
  3. Add specific disabled state styling

Consider applying these style improvements:

 .input-wrapper .checkbox-input {
   appearance: auto;
-  accent-color: #0BB489;
+  accent-color: var(--primary-color, #0BB489);
+  cursor: pointer;
 }
+
+.input-wrapper .checkbox-input:hover {
+  opacity: 0.8;
+}
+
+.input-wrapper .checkbox-input:focus {
+  outline: 2px solid var(--primary-color-light, rgba(11, 180, 137, 0.2));
+  outline-offset: 2px;
+}
+
+.input-wrapper .checkbox-input:disabled {
+  cursor: not-allowed;
+  opacity: 0.5;
+}
packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte (2)

88-89: Consider adding optional chaining in generateDetailParagraphs

While the optional chaining for accessing contentData properties is good, the generateDetailParagraphs function might still throw errors when accessing nested properties like info?.address?.["country-name"].

Consider updating the function to use optional chaining throughout:

 const generateDetailParagraphs = (info: any) => {
   return [
-    { label: "First Name", value: info?.firstName },
-    { label: "Last Name", value: info?.lastName },
-    { label: "Company Name", value: info?.businessName },
-    { label: "Tax Registration", value: info?.taxRegistration },
-    { label: "Country", value: info?.address?.["country-name"] },
-    { label: "City", value: info?.address?.locality },
-    { label: "Region", value: info?.address?.region },
-    { label: "Postal Code", value: info?.address?.["postal-code"] },
-    { label: "Street Address", value: info?.address?.["street-address"] },
-    { label: "Email", value: info?.email },
+    { label: "First Name", value: info?.firstName ?? undefined },
+    { label: "Last Name", value: info?.lastName ?? undefined },
+    { label: "Company Name", value: info?.businessName ?? undefined },
+    { label: "Tax Registration", value: info?.taxRegistration ?? undefined },
+    { label: "Country", value: info?.address?.["country-name"] ?? undefined },
+    { label: "City", value: info?.address?.locality ?? undefined },
+    { label: "Region", value: info?.address?.region ?? undefined },
+    { label: "Postal Code", value: info?.address?.["postal-code"] ?? undefined },
+    { label: "Street Address", value: info?.address?.["street-address"] ?? undefined },
+    { label: "Email", value: info?.email ?? undefined },
   ].filter((detail) => detail.value);
 };

Line range hint 1-724: Address TODOs and type safety issues

The file contains several issues that should be addressed:

  1. FIXME comment about using a non-deprecated function for currency management
  2. FIXME comment about adding rounding functionality
  3. Multiple @ts-expect-error annotations in the calculateItemTotal calls

Would you like me to help address any of these issues? I can:

  1. Research and suggest modern alternatives to the deprecated currency management function
  2. Implement a proper rounding function
  3. Help fix the type issues to remove the @ts-expect-error annotations
packages/create-invoice-form/src/lib/invoice/form.svelte (1)

376-382: Enhance encryption checkbox UX for better security awareness

The encryption toggle needs better visibility and user guidance:

  1. Consider moving it to a more prominent location (e.g., near the top of the form)
  2. Add help text explaining encryption's implications
  3. Add visual security indicators

Consider this enhanced implementation:

+<div class="encryption-section">
   <Input
     type="checkbox"
     id="isEncrypted"
-    label="Encrypt invoice"
+    label="🔒 Encrypt Invoice Contents"
     bind:checked={formData.isEncrypted}
+    helpText="When enabled, invoice details will be encrypted and only accessible to you and the recipient"
   />
+</div>

Also consider adding CSS styles to make it stand out:

.encryption-section {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 20px;
}
packages/invoice-dashboard/src/lib/view-requests.svelte (3)

533-533: LGTM! Consider applying similar null checks consistently.

The addition of optional chaining for accessing request?.contentData?.invoiceNumber is a good defensive programming practice that prevents potential runtime errors when these properties are undefined.

For consistency, consider applying similar null checks throughout the component where deep object properties are accessed. Here are some examples that could benefit from the same treatment:

- request.contentData.creationDate
+ request?.contentData?.creationDate

- request.contentData.paymentTerms.dueDate
+ request?.contentData?.paymentTerms?.dueDate

- request.payee.value
+ request?.payee?.value

- request.payer.value
+ request?.payer?.value

Line range hint 92-106: Enhance error handling with user-friendly messages.

The error handling in getRequests only logs to console, which isn't helpful for users when requests fail to load.

Consider adding user feedback using the toast system that's already imported:

 try {
   const requestsData = await requestNetwork?.fromIdentity({
     type: Types.Identity.TYPE.ETHEREUM_ADDRESS,
     value: account?.address,
   });
   requests = requestsData
     ?.map((request) => request.getData())
     .sort((a, b) => b.timestamp - a.timestamp);
 } catch (error) {
   console.error("Failed to fetch requests:", error);
+  toast.error("Failed to load requests", {
+    description: "Please try again later",
+    action: {
+      label: "Retry",
+      onClick: () => getRequests()
+    }
+  });
 }

Line range hint 146-166: Optimize expensive computations.

The processedRequests computation runs on every render, performing expensive operations like BigInt conversions and currency formatting.

Consider memoizing the results or moving the computation to a derived store:

-$: processedRequests = paginatedRequests?.map(
+const processRequest = (request) => {
+  const currencyInfo = getCurrencyFromManager(
+    request.currencyInfo,
+    currencyManager
+  );
+  return {
+    ...request,
+    formattedAmount: formatUnits(
+      BigInt(request.expectedAmount),
+      currencyInfo?.decimals ?? 18
+    ),
+    currencySymbol: currencyInfo!.symbol,
+  };
+};
+
+let memoizedProcessedRequests = new Map();
+
+$: processedRequests = paginatedRequests?.map(
   (request
   ): Types.IRequestDataWithEvents & {
     formattedAmount: string;
     currencySymbol: string;
-  } => {
-    const currencyInfo = getCurrencyFromManager(
-      request.currencyInfo,
-      currencyManager
-    );
-    return {
-      ...request,
-      formattedAmount: formatUnits(
-        BigInt(request.expectedAmount),
-        currencyInfo?.decimals ?? 18
-      ),
-      currencySymbol: currencyInfo!.symbol,
-    };
-  }
+  } => {
+    const cached = memoizedProcessedRequests.get(request.requestId);
+    if (cached) return cached;
+    const processed = processRequest(request);
+    memoizedProcessedRequests.set(request.requestId, processed);
+    return processed;
+  }
 );
packages/create-invoice-form/src/lib/create-invoice-form.svelte (1)

177-179: Avoid relying on exact error message strings for error handling

Using exact error message strings for control flow can be fragile, as the message might change or be localized. Consider using error codes or creating custom error classes to handle errors more reliably.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 60cdc60 and d7a4731.

📒 Files selected for processing (7)
  • packages/create-invoice-form/src/lib/create-invoice-form.svelte (2 hunks)
  • packages/create-invoice-form/src/lib/invoice/form.svelte (3 hunks)
  • packages/create-invoice-form/src/lib/utils/resetForm.ts (1 hunks)
  • packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte (2 hunks)
  • packages/invoice-dashboard/src/lib/view-requests.svelte (1 hunks)
  • shared/components/input.svelte (4 hunks)
  • shared/types/index.ts (1 hunks)
🔇 Additional comments (7)
shared/types/index.ts (1)

20-20: Verify proper initialization of encryption flag.

Since this flag controls sensitive data encryption, we should verify it's properly initialized to prevent accidental exposure of unencrypted data.

✅ Verification successful

Let me gather more information about the initialization and usage of the encryption flag by checking the form component and related files.


Let me check one more thing about the initialization and encryption handling in the form component.


Encryption flag is properly initialized and handled

The verification shows that:

  • isEncrypted is explicitly initialized to false in getInitialFormData()
  • The flag is properly handled in form submission with appropriate encryption logic
  • All property accesses are safe and intentional
  • The encryption state properly controls whether to create an encrypted or unencrypted request
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for proper initialization of isEncrypted flag
# Expected: Should always be explicitly set, not undefined

# Check form initialization
echo "Checking form initialization..."
rg -A 5 "getInitialFormData|initialFormData" 

# Check usage in form submission
echo "Checking form submission handling..."
rg -A 10 "submitForm.*isEncrypted|createRequest.*isEncrypted"

# Check for direct property access without optional chaining
echo "Checking for safe property access..."
rg "formData\.isEncrypted[^?]"

Length of output: 3496


Script:

#!/bin/bash
# Check the form component implementation
echo "Checking form component implementation..."
rg -A 10 "isEncrypted.*checkbox|encryption.*checkbox" 

# Check if there are any default values set for isEncrypted
echo "Checking default values..."
ast-grep --pattern 'isEncrypted: $_'

# Check for any encryption-related validation or error handling
echo "Checking validation..."
rg -A 5 "validate.*encrypt|check.*encrypt"

# Check the request preparation logic
echo "Checking request preparation..."
rg -A 10 "prepareRequestParams"

Length of output: 3864


Script:

#!/bin/bash
# Check the resetForm implementation for initial values
echo "Checking resetForm implementation..."
cat packages/create-invoice-form/src/lib/utils/resetForm.ts

# Check the form component's encryption handling
echo "Checking form encryption handling..."
rg -A 20 "formData\.isEncrypted" packages/create-invoice-form/src/lib/create-invoice-form.svelte

Length of output: 2366

packages/create-invoice-form/src/lib/utils/resetForm.ts (2)

56-56: LGTM! Well-structured addition of encryption support.

The isEncrypted flag is appropriately placed at the root level of the form data with a safe default value of false, making encryption opt-in.


56-56: Verify integration with encryption-related components.

Let's verify that the components using this flag are properly handling the encryption functionality.

✅ Verification successful

Encryption integration is properly implemented and handled

The verification shows that the isEncrypted flag is well-integrated within the codebase:

  • It's properly typed in the shared types (shared/types/index.ts)
  • The encryption toggle is implemented in the form component (packages/create-invoice-form/src/lib/invoice/form.svelte)
  • The encryption logic is handled in the form submission (packages/create-invoice-form/src/lib/create-invoice-form.svelte)
  • The default state of false in resetForm.ts aligns with the implementation
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for components and handlers that interact with the isEncrypted flag

# Look for form submission handling
echo "Checking form submission handlers..."
rg -A 5 "submitForm|handleSubmit" --type svelte

# Look for encryption checkbox or toggle
echo "Checking encryption UI controls..."
rg -A 3 "isEncrypted" --type svelte

# Look for Lit Protocol integration
echo "Checking Lit Protocol integration..."
rg -A 5 "lit-protocol|LitProtocol" --type typescript --type javascript

Length of output: 500


Script:

#!/bin/bash
# Let's try a different approach without file type restrictions

# Look for form submission handling
echo "Checking form submission handlers..."
rg -A 5 "submitForm|handleSubmit"

# Look for encryption UI controls and related code
echo "Checking encryption controls..."
rg -A 3 "isEncrypted"

# Look for Lit Protocol integration
echo "Checking Lit Protocol integration..."
rg -A 5 "lit-protocol|LitProtocol"

# Check for any encryption-related functions or components
echo "Checking encryption-related code..."
rg -A 5 "encrypt|encryption"

Length of output: 5176

shared/components/input.svelte (1)

9-9: LGTM: Props are well-typed and follow consistent patterns

The new props checked and handleCheckbox are properly typed and follow the same patterns as existing props in the component.

Also applies to: 12-12

packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte (1)

402-408: LGTM: Safe property access with consistent fallback

The optional chaining for accessing the note property is correctly implemented with a consistent fallback value.

packages/create-invoice-form/src/lib/invoice/form.svelte (1)

376-382: Verify encryption integration with Lit Protocol

Please ensure proper integration with Lit Protocol's encryption functionality:

  1. Verify key handling
  2. Confirm error handling for encryption failures
  3. Test encryption/decryption flow
packages/invoice-dashboard/src/lib/view-requests.svelte (1)

Line range hint 540-558: Review address handling security.

The component displays and allows copying of wallet addresses. While the formatAddress function helps with display, ensure proper validation and sanitization.

Let's verify the address handling implementation:

Consider adding address validation and sanitization:

+const isValidAddress = (address: string): boolean => {
+  return /^0x[a-fA-F0-9]{40}$/.test(address);
+};

+const sanitizeAddress = (address: string): string => {
+  return address.toLowerCase();
+};

 <td>
   <div class="address">
     <span>
-      {formatAddress(request.payee?.value ?? "")}
+      {isValidAddress(request.payee?.value) 
+        ? formatAddress(sanitizeAddress(request.payee.value))
+        : "Invalid Address"}
     </span>
-    <Copy textToCopy={request.payee?.value} />
+    <Copy textToCopy={isValidAddress(request.payee?.value)
+      ? sanitizeAddress(request.payee.value)
+      : ""} />
   </div>
 </td>

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
packages/create-invoice-form/src/lib/create-invoice-form.svelte (1)

Line range hint 221-227: Enhance error handling and user feedback

While the typo fix is good, consider improving the error handling:

  1. Provide more user-friendly error messages
  2. Add structured error logging for debugging

Consider this enhancement:

-        if (error.message.includes("Transaction confirmation not received")) {
+        console.error('Invoice creation failed:', {
+          error: error.message,
+          requestParams: requestCreateParameters,
+          stack: error.stack
+        });
+        
+        if (error.message.includes("Transaction confirmation not received")) {
           isTimeout = true;
           removeAllStatuses();
         } else {
           addToStatus(APP_STATUS.ERROR_OCCURRED);
-          console.error("Failed to create request:", error);
+          // Show user-friendly error message
+          const errorMessage = error.message.includes("insufficient funds")
+            ? "Insufficient funds to create invoice. Please check your wallet balance."
+            : "Failed to create invoice. Please try again or contact support.";
+          addToStatus(errorMessage);
         }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 13fe119 and 3f0efaf.

📒 Files selected for processing (3)
  • packages/create-invoice-form/src/lib/create-invoice-form.svelte (2 hunks)
  • packages/create-invoice-form/src/lib/utils/resetForm.ts (1 hunks)
  • packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/create-invoice-form/src/lib/utils/resetForm.ts
  • packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte
🧰 Additional context used
📓 Learnings (1)
packages/create-invoice-form/src/lib/create-invoice-form.svelte (1)
Learnt from: rodrigopavezi
PR: RequestNetwork/web-components#191
File: packages/create-invoice-form/src/lib/create-invoice-form.svelte:143-170
Timestamp: 2024-11-15T12:50:29.101Z
Learning: In the `web-components` project, when using the `requestNetwork` SDK, the public method `createEncryptedRequest` is not exported; instead, the private method `_createEncryptedRequest` must be used to create encrypted requests.
🔇 Additional comments (2)
packages/create-invoice-form/src/lib/create-invoice-form.svelte (2)

26-26: LGTM: Import statement is correctly placed

The import of EncryptionTypes is properly organized with other type imports and is necessary for the encryption implementation.


187-214: ⚠️ Potential issue

Critical: Implementation doesn't match PR objectives and has security concerns

Several issues need to be addressed:

  1. The implementation uses KMS method instead of Lit Protocol as specified in PR objectives (#146).
  2. Using wallet addresses directly as encryption keys (requestInfo.payee?.value and requestInfo.payer?.value) might not be secure.
  3. Missing validation for encryption keys.
  4. No specific error handling for encryption failures.

Consider implementing the following changes:

 if(formData.isEncrypted) {
+  // Validate encryption requirements
+  if (!requestCreateParameters.requestInfo.payee?.value || !requestCreateParameters.requestInfo.payer?.value) {
+    throw new Error('Both payee and payer addresses are required for encryption');
+  }
+
+  // Initialize Lit Protocol
+  const litNodeClient = new LitJsSdk.LitNodeClient();
+  await litNodeClient.connect();
+
   const payeeEncryptionPublicKey = {
-    key: requestCreateParameters.requestInfo.payee?.value!,
-    method: EncryptionTypes.METHOD.KMS,
+    key: await generateLitProtocolKey(litNodeClient, requestCreateParameters.requestInfo.payee.value),
+    method: EncryptionTypes.METHOD.LIT_PROTOCOL,
   };
   const payerEncryptionPublicKey = {
-    key: requestCreateParameters.requestInfo.payer?.value!,
-    method: EncryptionTypes.METHOD.KMS,
+    key: await generateLitProtocolKey(litNodeClient, requestCreateParameters.requestInfo.payer.value),
+    method: EncryptionTypes.METHOD.LIT_PROTOCOL,
   };

+  try {
     request = await requestNetwork._createEncryptedRequest(
       {
         requestInfo: requestCreateParameters.requestInfo,
         signer: requestCreateParameters.signer,
         paymentNetwork: requestCreateParameters.paymentNetwork,
         contentData: requestCreateParameters.contentData,
       },
       [payeeEncryptionPublicKey, payerEncryptionPublicKey],
     );
+  } catch (error) {
+    console.error('Encryption failed:', error);
+    throw new Error('Failed to encrypt invoice data');
+  }

Let's verify the Lit Protocol integration requirements:

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (1)
packages/create-invoice-form/src/lib/invoice/form.svelte (1)

457-462: Consider adding a tooltip or help text for the encryption option.

Since this handles sensitive information like tax IDs and addresses, users should understand when to use encryption and its implications.

 <Input
   type="checkbox"
   id="isEncrypted"
   label="Encrypt invoice"
+  tooltip="Encrypts sensitive invoice data using Lit Protocol. Only the sender and recipient can view the complete details."
   bind:checked={formData.isEncrypted}
 />
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3f0efaf and 0d6df42.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • packages/create-invoice-form/src/lib/invoice/form.svelte (1 hunks)
  • packages/invoice-dashboard/src/lib/view-requests.svelte (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/invoice-dashboard/src/lib/view-requests.svelte

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
shared/components/input.svelte (2)

42-53: Consider using change event instead of click for checkbox

While the implementation is generally good, consider these improvements:

  1. Use on:change instead of on:click for better semantic meaning and to capture all ways a checkbox can be toggled (click, keyboard, etc.)
  2. The label wrapper already provides click functionality, so the explicit label text could be simplified
    <label for={id} class="input-label">
      <input
        {id}
        type="checkbox"
        bind:checked={checked}
        {disabled}
        class={`checkbox-input ${className} ${error ? "input-error" : ""}`}
-       on:click={handleCheckbox}
+       on:change={handleCheckbox}
      />
-     {label}
+     <span>{label}</span>
    </label>

142-145: Consider adding fallback styles for accent-color

While accent-color has good browser support, consider adding fallback styles for older browsers:

  .input-wrapper .checkbox-input {
    appearance: auto;
+   /* Fallback for browsers that don't support accent-color */
+   border-color: #0BB489;
+   background-color: white;
+   &:checked {
+     background-color: #0BB489;
+   }
    accent-color: #0BB489;
  }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0d6df42 and ea44350.

📒 Files selected for processing (1)
  • shared/components/input.svelte (4 hunks)
🔇 Additional comments (2)
shared/components/input.svelte (2)

9-9: LGTM: Props are well-defined and properly typed

The new checked and handleCheckbox props are correctly implemented with appropriate types and defaults, following the component's existing patterns.

Also applies to: 12-12


Line range hint 1-24: Verify integration with invoice encryption feature

The checkbox implementation supports the PR's encryption feature. Let's verify its integration:

✅ Verification successful

Input component correctly integrated with encryption feature

The verification confirms proper integration:

  • The input component is used in packages/create-invoice-form/src/lib/invoice/form.svelte as a checkbox for encryption
  • It's correctly bound to formData.isEncrypted state
  • The encryption state is properly handled in form submission logic
  • The type definition in shared/types/index.ts includes isEncrypted field
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usage of this input component with checkbox type
# and verify it's properly integrated with encryption logic

# Look for checkbox usage in invoice form
rg -l "input.svelte.*checkbox.*isEncrypted" 

# Check for proper encryption handling
ast-grep --pattern 'isEncrypted.*\{.*\$\$\$.*\}'

Length of output: 96


Script:

#!/bin/bash
# Let's try a broader search to find any references to the input component
# and encryption-related functionality

# Find all Svelte files that import the input component
rg -l "import.*input\.svelte" --type svelte

# Search for any encryption-related checkbox implementations
rg "checkbox.*encrypt" --type svelte -B 2 -A 2

# Look for any encryption state management
rg "isEncrypted|encryption" --type svelte -B 2 -A 2

Length of output: 241


Script:

#!/bin/bash
# Let's try without file type filtering since Svelte isn't recognized

# Find all files that import the input component
rg -l "import.*input\.svelte"

# Search for any encryption-related checkbox implementations
rg "checkbox.*encrypt" -B 2 -A 2

# Look for any encryption state management
rg "isEncrypted|encryption" -B 2 -A 2

Length of output: 1866

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (10)
packages/invoice-dashboard/src/lib/view-requests.svelte (2)

391-401: Consider optimizing reactive statements to prevent unnecessary API calls.

The current implementation might trigger unnecessary API calls when the slider value changes. Consider debouncing the getRequests() call or adding a condition to check if the decryption state actually changed.

-$: sliderValue, getRequests();
+let previousSliderValue = sliderValue;
+$: if (sliderValue !== previousSliderValue) {
+  previousSliderValue = sliderValue;
+  getRequests();
+}

-$: {
-  if(sliderValue === 'on') {
-    switchOnDecryption(true);
-  } else {
-    switchOnDecryption(false);
-  }
-}
+$: switchOnDecryption(sliderValue === 'on');

431-447: Improve UI structure and styling.

The current implementation has some structural issues:

  1. Duplicate "search-wrapper" class names
  2. Inline styles that could be moved to the style block
-<div class="search-wrapper">
-  <div class="search-wrapper" style="gap: 10px;">
+<div class="search-container">
+  <div class="search-controls">
     <Input
       placeholder="Search..."
       width="w-[300px]"
       handleInput={handleSearchChange}
     >
       <div slot="icon">
         <Search />
       </div>
     </Input>
-    <div class="width: fit-content;">
+    <div class="switch-container">
       <Switch bind:value={sliderValue} label="Show encrypted requests" fontSize={14} design="slider" />
     </div>
   </div>

Add to the style block:

.search-container {
  display: flex;
  flex-direction: column;
}

.search-controls {
  display: flex;
  gap: 10px;
}

.switch-container {
  width: fit-content;
}
shared/components/switch.svelte (8)

29-30: Remove unused slugify function

The slugify function defined on lines 29-30 is not used anywhere in the component. Keeping unused code can lead to confusion and maintainability issues.

Apply this diff to remove the unused function:

-const slugify = (str = "") =>
-  str.toLowerCase().replace(/ /g, "-").replace(/\./g, "");

65-65: Add name attribute to radio inputs for better accessibility

In the 'multi' design option, the radio inputs lack a name attribute on line 65. While bind:group handles grouping in Svelte, adding a name attribute improves accessibility and ensures that radios are properly grouped in the DOM.

Apply this diff to add the name attribute:

<input type="radio" id={`${option}-${uniqueID}`} value={option} bind:group={value}>
+           name={`switch-${uniqueID}`}>

94-96: Duplicate CSS selectors for .s--inner button:focus

The .s--inner button:focus selector is defined twice with different styles:

First definition (lines 94-96):

.s--inner button:focus {
    outline: #0bb489 solid 1px;
}

Second definition (lines 242-245):

.s--inner button:focus {
    box-shadow: 0 0px 8px #0bb489;
    border-radius: 0.1em;
}

Combine these styles to avoid conflicts and ensure a consistent focus state:

.s--inner button:focus {
    outline: #0bb489 solid 1px;
    box-shadow: 0 0px 8px #0bb489;
    border-radius: 0.1em;
}

Remove one of the duplicated selectors to clean up the codebase.

Also applies to: 242-245


134-136: Duplicate CSS selectors for .s--slider button:focus

The .s--slider button:focus selector is also defined twice:

First definition (lines 134-136):

.s--slider button:focus {
    box-shadow: 0 0px 0px 1px #0bb489;
}

Second definition (lines 256-259):

.s--slider button:focus {
    box-shadow: 0 0px 8px #0bb489;
    border-radius: 1.5em;
}

Consolidate these styles for consistency:

.s--slider button:focus {
    box-shadow: 0 0px 8px #0bb489;
    border-radius: 1.5em;
}

Ensure that the box-shadow values are set as intended.

Also applies to: 256-259


19-27: Ensure correct toggling logic in handleClick function

The handleClick function on lines 19-27 toggles the checked state based on the aria-checked attribute, which is a string. While the current implementation works, consider simplifying the logic for readability:

Apply this diff to streamline the toggling logic:

-function handleClick(event){
-    const target = event.target
-
-    const state = target.getAttribute('aria-checked')
-
-    checked = state === 'true' ? false : true
-
-    value = checked === true ? 'on' : 'off'
-}
+function handleClick() {
+    checked = !checked;
+    value = checked ? 'on' : 'off';
+}

This approach eliminates unnecessary variable assignments and makes the toggling action clearer.


75-262: Consider splitting styles into separate files for maintainability

The styles for the component are extensive and cover multiple design variations. For better organization and maintainability, consider splitting the CSS into separate files or using scoped styles.

Organize styles by design option:

  • Create separate style files for 'inner', 'slider', and 'multi' designs.
  • Import them as needed in the component.

Alternatively, use Svelte's scoped styles to limit the impact of styles to the component.

This approach improves readability and makes future updates easier to manage.


1-32: Add documentation comments for better code clarity

The script block lacks documentation comments explaining the purpose of variables and functions. Adding brief comments enhances code readability and helps other developers understand the component's functionality.

For example:

// Determines if the switch is in the 'on' or 'off' state based on the initial value.
let checked = value === 'on';

// Generates a unique ID for accessibility attributes.
const uniqueID = /* ... */;

Consider adding comments above key sections of the code.


75-262: Use CSS variables for theme customization

The component uses hardcoded colors like #0bb489 for focus and background styles. Consider using CSS variables to allow for theming and easier color management.

Define CSS variables at the beginning of your style block:

:root {
    --switch-focus-color: #0bb489;
    --switch-background-color: #fff;
}

Replace hardcoded colors with variables:

.s--inner button:focus {
    outline: var(--switch-focus-color) solid 1px;
}

This makes it easier to update colors and supports theming across your application.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ea44350 and 551b30e.

📒 Files selected for processing (2)
  • packages/invoice-dashboard/src/lib/view-requests.svelte (6 hunks)
  • shared/components/switch.svelte (1 hunks)
🔇 Additional comments (3)
packages/invoice-dashboard/src/lib/view-requests.svelte (2)

10-10: LGTM: Props and imports are well-structured!

The new Switch component import and decryption-related props are properly typed and initialized.

Also applies to: 53-56


712-714: LGTM: Improved loading state handling!

The loading state handling is now more precise, showing the DashboardSkeleton component only when actually loading.

shared/components/switch.svelte (1)

14-14: Synchronize checked and value properties

On line 14, checked is initialized based on value. Ensure that any external changes to value also update checked, and vice versa. You might need to use $: reactive statements to keep them in sync.

Run the following script to check for reactive declarations:

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
packages/invoice-dashboard/src/lib/view-requests.svelte (3)

53-54: Consider improving type safety for the switchOnDecryption prop

The type definition could be more precise by removing the undefined union type since it's not actually optional according to usage.

-export let switchOnDecryption: (option: boolean) => void | undefined;
+export let switchOnDecryption: (option: boolean) => void;

391-401: Optimize reactive statements for decryption control

The current implementation has two separate reactive statements that could be consolidated for better efficiency and readability.

-$: sliderValue, getRequests();
-
-$: {
-  if(sliderValue === 'on') {
-    switchOnDecryption(true);
-  } else {
-    switchOnDecryption(false);
-  }
-}

+$: {
+  const isOn = sliderValue === 'on';
+  switchOnDecryption(isOn);
+  getRequests();
+}

433-446: Simplify nested search wrapper structure

The search wrapper has redundant nesting that can be simplified.

-<div class="search-wrapper" style="gap: 10px;">
+<div style="display: flex; gap: 10px; align-items: center;">
   <Input
     placeholder="Search..."
     width="w-[300px]"
     handleInput={handleSearchChange}
   >
     <div slot="icon">
       <Search />
     </div>
   </Input>
-  <div class="width: fit-content;">
+  <div style="width: fit-content;">
     <Switch bind:value={sliderValue} label="Show encrypted requests" fontSize={14} design="slider" />
   </div>
 </div>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 551b30e and 0f4ceb5.

📒 Files selected for processing (2)
  • packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte (2 hunks)
  • packages/invoice-dashboard/src/lib/view-requests.svelte (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte
🔇 Additional comments (2)
packages/invoice-dashboard/src/lib/view-requests.svelte (2)

712-714: LGTM: Loading state handling

The loading state handling is implemented correctly, showing the skeleton loader only when the loading state is true.


Line range hint 1-1000: Verify encryption integration with the Request Network client

The encryption feature looks well-implemented, but we should verify that the Request Network client properly handles the encrypted requests when the decryption is switched on/off.

✅ Verification successful

Encryption integration is properly implemented

The encryption feature is correctly integrated across the codebase:

  • The view-requests.svelte component properly handles encryption state through isDecryptionSwitchedOn prop and switchOnDecryption callback
  • The create invoice form supports encryption through _createEncryptedRequest method with proper KMS encryption keys
  • The implementation follows Request Network's encryption types and methods
  • The UI provides clear user control through a labeled switch component
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for encryption-related code in the Request Network client integration

# Look for encryption-related methods in the Request Network client usage
rg -A 5 "requestNetwork\?\..*encrypt" 

# Look for any encryption-related types or interfaces
ast-grep --pattern 'interface $_ {
  $$$
  encrypt$_?: $_
  $$$
}'

Length of output: 108


Script:

#!/bin/bash
# Let's try a broader search for encryption-related code

# Search for any encryption-related terms in the codebase
rg -i "encrypt" --type ts --type svelte

# Look for Request Network client configuration and usage
rg -A 5 "requestNetwork\." --type ts --type svelte

# Search for any decryption-related props or state
ast-grep --pattern 'let isDecryption$_: boolean'

# Check for switch/toggle handlers related to encryption
ast-grep --pattern 'function $_(option: boolean) {
  $$$
}'

Length of output: 267


Script:

#!/bin/bash
# Let's try searching without file type restrictions since .svelte may not be recognized

# Search for any encryption-related terms
rg -i "encrypt"

# Look for Request Network client configuration and usage
rg -A 5 "requestNetwork\."

# Search for isDecryptionSwitchedOn prop usage
rg "isDecryptionSwitchedOn"

# Search for switchOnDecryption function usage
rg "switchOnDecryption"

Length of output: 3712

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (2)
shared/components/switch.svelte (2)

29-30: Remove unused slugify function

The slugify function is defined but never used in the component.

Consider removing this unused function to improve code maintainability.


8-12: Consider enhancing component type safety and flexibility

The component could benefit from several architectural improvements:

  1. Add TypeScript support for better type safety
  2. Document props with JSDoc comments
  3. Add custom events for better integration

Example implementation:

/**
 * @typedef {'inner' | 'slider' | 'multi'} SwitchDesign
 */

/**
 * @typedef {Object} SwitchProps
 * @property {string} label - The label for the switch
 * @property {SwitchDesign} [design='inner'] - The switch design variant
 * @property {string[]} [options=[]] - Options for multi design variant
 * @property {number} [fontSize=16] - Font size in pixels
 * @property {'on' | 'off'} [value='off'] - Current switch value
 */

/** @type {SwitchProps} */
export let label;
export let design = 'inner';
export let options = [];
export let fontSize = 16;
export let value = 'off';

// Custom events
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();

function handleChange() {
    dispatch('change', { value });
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0f4ceb5 and bd9fba7.

📒 Files selected for processing (1)
  • shared/components/switch.svelte (1 hunks)
🔇 Additional comments (1)
shared/components/switch.svelte (1)

82-86: Conflicting CSS rules for [role='switch'][aria-checked] selectors

As noted in the previous review, there are conflicting CSS rules for the same selectors. This needs to be resolved to ensure consistent behavior.

Also applies to: 235-240

rodrigopavezi and others added 4 commits December 2, 2024 15:59
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (2)
shared/components/switch.svelte (1)

77-81: Consider consolidating duplicate CSS selectors.

There are duplicate selectors for [role='switch'][aria-checked] with conflicting display properties.

Consider consolidating these styles:

-[role='switch'][aria-checked='true'] :first-child,
-[role='switch'][aria-checked='false'] :last-child {
-    display: none;
-    color: #fff;
-}

-[role='switch'][aria-checked='true'] :first-child,
-[role='switch'][aria-checked='false'] :last-child {
-    border-radius: 0.25em;
-    background: #0bb489;
-    display: inline-block;
-}

+[role='switch'][aria-checked='true'] :first-child,
+[role='switch'][aria-checked='false'] :last-child {
+    color: #fff;
+    border-radius: 0.25em;
+    background: #0bb489;
+    display: inline-block;
+}

Also applies to: 230-235

packages/invoice-dashboard/src/lib/view-requests.svelte (1)

57-57: Consider using a more direct reactive statement.

The current implementation uses two reactive statements for handling encryption state. This could be simplified.

Consider consolidating the reactive statements:

-let sliderValueForDecryption = isDecryptionEnabled ? "on" : "off";
-
-$: sliderValueForDecryption, getRequests(); 
-
-$: {
-  if(sliderValueForDecryption === 'on') {
-    enableDecryption(true);
-  } else {
-    enableDecryption(false);
-  }
-}

+let sliderValueForDecryption = isDecryptionEnabled ? "on" : "off";
+
+$: {
+  const isEnabled = sliderValueForDecryption === 'on';
+  enableDecryption(isEnabled);
+  getRequests();
+}

Also applies to: 394-402

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between bd9fba7 and 195c2cb.

📒 Files selected for processing (5)
  • packages/create-invoice-form/package.json (1 hunks)
  • packages/invoice-dashboard/package.json (1 hunks)
  • packages/invoice-dashboard/src/lib/view-requests.svelte (6 hunks)
  • packages/payment-widget/package.json (1 hunks)
  • shared/components/switch.svelte (1 hunks)
🔇 Additional comments (8)
shared/components/switch.svelte (3)

8-12: LGTM: Props are well-defined with appropriate defaults.

The component exports necessary props with sensible defaults, making it flexible and reusable.


19-22: LGTM: Event handler follows Svelte's reactivity patterns.

The handleClick function properly updates both the checked state and value prop using Svelte's reactivity.


33-39: LGTM: Accessible markup with proper ARIA attributes.

The component implements proper accessibility patterns:

  • Uses appropriate ARIA roles (switch, radiogroup)
  • Includes proper labeling with aria-labelledby
  • Maintains state with aria-checked

Also applies to: 45-49, 53-64

packages/invoice-dashboard/src/lib/view-requests.svelte (3)

54-55: LGTM: Well-typed props for encryption functionality.

The props are properly typed and follow a clear naming convention:

  • isDecryptionEnabled: boolean flag
  • enableDecryption: callback function

434-447: LGTM: Well-structured UI integration for encryption toggle.

The Switch component is properly integrated into the search wrapper with appropriate styling and layout.


605-605: LGTM: Improved loading state handling.

The loading state is properly handled with the DashboardSkeleton component, providing better user feedback.

Also applies to: 713-715

packages/payment-widget/package.json (1)

59-61: Consider Lit Protocol integration for payment processing

Since the invoicing template will support encryption via Lit Protocol, the payment widget might need decryption capabilities to process encrypted invoice data.

Let's verify if the payment processor handles encrypted data:

packages/invoice-dashboard/package.json (1)

40-42: Verify version consistency across packages

The dependency updates are coordinated across packages, but let's verify there are no version conflicts:

Also applies to: 59-61, 36-37

✅ Verification successful

All package versions are consistent across the monorepo

The verification shows that:

  • @requestnetwork/request-client.js is consistently at version 0.51.0 across all packages
  • @requestnetwork/payment-processor is consistently at version 0.49.0 where used
  • No version conflicts or inconsistencies were found
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for version consistency across all package.json files
echo "Checking @requestnetwork/request-client.js versions:"
fd -t f "package.json" | xargs grep "@requestnetwork/request-client.js"

echo -e "\nChecking @requestnetwork/payment-processor versions:"
fd -t f "package.json" | xargs grep "@requestnetwork/payment-processor"

echo -e "\nChecking for any Lit Protocol related dependencies:"
fd -t f "package.json" | xargs grep "lit-protocol"

Length of output: 994

@MantisClone
Copy link
Member

Gentle reminder that screenshots make it a lot easier to review 🙏

@rodrigopavezi rodrigopavezi merged commit cb88792 into main Dec 3, 2024
1 check passed
@rodrigopavezi rodrigopavezi deleted the feat/lit-protocol branch December 3, 2024 11:43
@coderabbitai coderabbitai bot mentioned this pull request Dec 4, 2024
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.

Encryption: Add Lit Protocol to the Invoicing Template

4 participants