Skip to content

Conversation

@zupzup
Copy link
Collaborator

@zupzup zupzup commented Dec 17, 2025

📝 Description

  • Fix validation for deleting the last signatory of a company
  • Fix plain text identity chain bug when accepting/rejecting an invite
  • Fix company logo and file upload to use company key instead of personal key
  • Fix switching to personal identity when deleting oneself from company

Relates to #766


✅ Checklist

Please ensure the following tasks are completed before requesting a review:

  • My code adheres to the coding guidelines of this project.
  • I have run cargo fmt.
  • I have run cargo clippy.
  • I have added or updated tests (if applicable).
  • All CI/CD steps were successful.
  • I have updated the documentation (if applicable).
  • I have checked that there are no console errors or warnings.
  • I have verified that the application builds without errors.
  • I've described the changes made to the API. (modification, addition, deletion).

🚀 Changes Made

See above.


💡 How to Test

Please provide clear instructions on how reviewers can test your changes:

  1. cargo test
  2. test above mentioned fixes

🤝 Related Issues

List any related issues, pull requests, or discussions:


📋 Review Guidelines

Please focus on the following while reviewing:

  • Does the code follow the repository's contribution guidelines?
  • Are there any potential bugs or performance issues?
  • Are there any typos or grammatical errors in the code or comments?

Copy link
Contributor

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 rebases hotfix 0.5.0-1 to master, containing four critical bug fixes related to company operations, identity management, and file handling. The changes ensure proper key usage for company file operations, correct identity state transitions, and accurate validation logic for company signatories.

  • Fixed company file operations to use company keys instead of personal keys for encryption/decryption
  • Fixed identity chain plaintext serialization to use correct data types for accept/reject invite operations
  • Fixed last signatory validation to only count fully accepted signatories
  • Fixed active identity switching to revert to personal identity when removed from a company

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/bcr-ebill-wasm/src/api/company.rs Changed file retrieval to use company keys via get_company_and_keys_by_id() instead of personal keys
crates/bcr-ebill-wasm/main.js Added test UI functionality for fetching company proof of registration files
crates/bcr-ebill-wasm/index.html Added button for testing proof of registration file retrieval
crates/bcr-ebill-transport/src/handler/company_chain_event_processor.rs Added logic to switch active identity to personal when removed from company
crates/bcr-ebill-core/src/protocol/blockchain/mod.rs Simplified iterator pattern using rfind instead of filter().next_back()
crates/bcr-ebill-core/src/protocol/blockchain/identity/mod.rs Fixed plaintext serialization to use correct types for accept/reject signatory invite
crates/bcr-ebill-api/src/service/transport_service/mod.rs Removed unused log::error import
crates/bcr-ebill-api/src/service/company_service.rs Fixed last signatory validation, file upload key usage, identity switching, and added test expectations
CHANGELOG.md Added entry for hotfix 0.5.0-1 documenting all fixes

@codecov
Copy link

codecov bot commented Dec 17, 2025

@zupzup zupzup merged commit 81a2f3a into master Dec 17, 2025
12 of 13 checks passed
@zupzup zupzup deleted the rebase-hotfix-to-master branch December 17, 2025 13:39
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.

3 participants