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?

@codecov
Copy link

codecov bot commented Dec 17, 2025

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 hotfix release (0.5.0-1) addresses four critical bugs related to company signatory management, file handling, and identity chain serialization. The changes fix security issues with file encryption keys, improve validation logic for signatory removal, correct plaintext data type mismatches in identity blockchain operations, and ensure proper active identity switching when users are removed from companies.

  • Fix company file operations to use company keys instead of personal identity keys for encryption/decryption
  • Fix validation logic to only count fully accepted signatories when preventing removal of the last signatory
  • Fix plaintext identity chain bug where accept/reject invite operations were incorrectly using the wrong data types
  • Implement automatic switching to personal identity when a user is removed from a company they're currently using as active identity

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Cargo.toml Bump version to 0.5.0-1 for hotfix release
CHANGELOG.md Document the four bug fixes in hotfix release notes
crates/bcr-ebill-wasm/src/api/company.rs Fix file retrieval to use company keys instead of personal keys
crates/bcr-ebill-wasm/main.js Add test utility for fetching company proof files with proper key usage
crates/bcr-ebill-wasm/index.html Add UI button for testing company file retrieval
crates/bcr-ebill-core/src/protocol/blockchain/identity/mod.rs Fix plaintext data types for accept/reject signatory invite operations
crates/bcr-ebill-core/src/protocol/blockchain/mod.rs Refactor iterator method from filter+next_back to rfind for cleaner code
crates/bcr-ebill-api/src/service/company_service.rs Fix signatory validation, company file key usage, active identity switching, and add test mock
crates/bcr-ebill-api/src/service/transport_service/mod.rs Remove unused import
crates/bcr-ebill-transport/src/handler/company_chain_event_processor.rs Add active identity switching when remotely removed from company

@zupzup zupzup merged commit bace707 into 0-5-0-release Dec 17, 2025
10 of 11 checks passed
@zupzup zupzup deleted the hotxif-0-5-0-1 branch December 17, 2025 13:10
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