Add signer address for endorsement calls#594
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Pull Request Overview
This PR extends participant types to include signer addresses for endorsement-related API calls.
- Replaces existing
LightBillIdentParticipantWebwith a newLightBillIdentParticipantWithAddressWebin the WASM data model - Updates the core
LightBillParticipant::Identvariant to carry address data - Adds a CHANGELOG entry for the new signer address field
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/bcr-ebill-wasm/src/data/bill.rs | Updated LightBillParticipantWeb enum to use the WithAddress variant |
| crates/bcr-ebill-core/src/contact/mod.rs | Modified LightBillParticipant enum to include address in Ident |
| CHANGELOG.md | Documented the addition of the signer address for endorsement calls |
Comments suppressed due to low confidence (3)
crates/bcr-ebill-core/src/contact/mod.rs:164
- [nitpick] Consider renaming the enum variant from
IdenttoIdentWithAddressto more clearly communicate that this variant now includes an address field and improve consistency between the variant name and its payload type.
Ident(LightBillIdentParticipantWithAddress),
crates/bcr-ebill-wasm/src/data/bill.rs:852
- Add or update unit tests covering the
LightBillIdentParticipantWithAddressWebvariant to verify that the new address field is correctly serialized and deserialized in endorsement-related API calls.
pub enum LightBillParticipantWeb {
crates/bcr-ebill-wasm/src/data/bill.rs:854
- Ensure the
From<LightBillParticipant>implementation is updated to map the old Ident variant toLightBillIdentParticipantWithAddressWeb, including passing through the address field. Without this change, conversions will either fail to compile or omit the address.
Ident(LightBillIdentParticipantWithAddressWeb),
PR Code Suggestions ✨No code suggestions found for the PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
bd1023a to
b7c10e5
Compare
User description
📝 Description
Relates to #581
✅ Checklist
Please ensure the following tasks are completed before requesting a review:
cargo fmt.cargo clippy.🚀 Changes Made
See above.
💡 How to Test
Please provide clear instructions on how reviewers can test your changes:
🤝 Related Issues
List any related issues, pull requests, or discussions:
📋 Review Guidelines
Please focus on the following while reviewing:
PR Type
Enhancement
Description
Add signer address to endorsement API calls
Update data structures to include address information
Modify web bindings for frontend compatibility
Changes diagram
Changes walkthrough 📝
mod.rs
Update participant data structure with addresscrates/bcr-ebill-core/src/contact/mod.rs
LightBillParticipantenum to useLightBillIdentParticipantWithAddressLightBillIdentParticipantwith address-enabled variantbill.rs
Update web bindings for address supportcrates/bcr-ebill-wasm/src/data/bill.rs
LightBillParticipantWebenumIdentvariant to useLightBillIdentParticipantWithAddressWebCHANGELOG.md
Document signer address feature additionCHANGELOG.md