feat: add Bill of Exchange template and update dependencies - #9
feat: add Bill of Exchange template and update dependencies#9manishdex25 wants to merge 7 commits into
Conversation
* Introduced a new Bill of Exchange template in the decentralized renderer. * Updated the @trustvc/trustvc package to version 2.16.0-beta.1. * Added new dependencies and updated existing ones in package-lock.json. * Enhanced the document template resolution to include the new Bill of Exchange template.
|
Warning Review limit reached
Next review available in: 58 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request adds a typed bill-of-exchange React template, registers it under ChangesBill of Exchange Template
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant VC as W3C Data Integrity Proof VC
participant Resolver as documentTemplates
participant Registry as Template registry
participant Template as Bill-of-exchange Template
VC->>Resolver: Provide BILL_OF_EXCHANGE render method
Resolver->>Registry: Find registered template
Registry-->>Resolver: Return BillOfExchange template
Resolver->>Template: Resolve custom template
Template-->>Resolver: Return rendered bill of exchange
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@example/decentralized-renderer/templates/billOfExchange/template.tsx`:
- Around line 139-144: Update the signature rendering in the bill-of-exchange
template so the credential-controlled signature value is never used directly as
an image URL. Render only validated inline image data, or pass approved remote
images through the existing trusted proxy/allow-list mechanism before assigning
the result to the img src.
- Around line 39-44: Update formatAmountInFigures so invalid or non-finite
amountInFigures values are not converted to zero; format only finite canonical
numeric values, and otherwise preserve the supplied value or use the template’s
validation-error behavior. Keep currency-only and valid amount formatting
unchanged.
In `@src/utils.test.tsx`:
- Around line 203-206: The test currently validates a duplicated local fixture
instead of the production template registry. Update the test around
templateRegistry to import and exercise the registry from the production
templates index, then assert that BILL_OF_EXCHANGE resolves to its registered
Bill of Exchange component; remove the duplicate local mapping.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8d8650fa-f4b0-43cb-b2a0-096453df5219
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
example/decentralized-renderer/templates/billOfExchange/index.tsxexample/decentralized-renderer/templates/billOfExchange/template.tsxexample/decentralized-renderer/templates/index.tsxpackage.jsonsrc/utils.test.tsx
…te.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…derer-react-components into feature/boe-v2
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@example/decentralized-renderer/templates/billOfExchange/template.tsx`:
- Around line 41-46: Update the amount formatting logic near numericAmount so it
preserves the exact supplied decimal string without converting through Number or
IEEE 754 floating point. Format integer grouping and fractional digits directly,
or use an arbitrary-precision decimal formatter, while retaining the existing
fallback for invalid or empty values and the currencyCode/amount output
contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f1ad817d-a65a-40c9-a8e4-7a43e3e18869
📒 Files selected for processing (2)
example/decentralized-renderer/templates/billOfExchange/template.tsxsrc/utils.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/utils.test.tsx
…te.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
What is the background of this pull request?
Changes
Issues
What are the related issues or stories?
Summary by CodeRabbit
New Features
BILL_OF_EXCHANGE.Bug Fixes
Tests