Skip to content

Commit ca14014

Browse files
committed
Clean up comments
1 parent ab4ad82 commit ca14014

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

xmtp_id/src/associations/association_log.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ impl LogEntry for AddAssociation {
9393
) -> Result<AssociationState, AssociationError> {
9494
let existing_state = maybe_existing_state.ok_or(AssociationError::NotCreated)?;
9595

96+
// Catch replays per-association
97+
// The real hash function should probably just be the signature text, but since that's stubbed out I have some more inputs
9698
let association_hash = self.hash();
9799
if existing_state.has_seen(&association_hash) {
98100
return Err(AssociationError::Replay);
@@ -110,7 +112,7 @@ impl LogEntry for AddAssociation {
110112
}
111113
}
112114

113-
// Get the current version of the entity that added this new entry. If it has been revoked and added back, it will now be unrevoked
115+
// Find the existing entity that authorized this add
114116
let existing_entity = existing_state
115117
.get(&existing_member_address)
116118
.ok_or(AssociationError::MissingExistingMember)?;

xmtp_id/src/associations/signature.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub enum SignatureError {
88

99
#[derive(Clone, Debug, PartialEq)]
1010
pub enum SignatureKind {
11+
// We might want to have some sort of LegacyErc191 Signature Kind for the `CreateIdentity` signatures only
1112
Erc191,
1213
Erc1271,
1314
InstallationKey,

0 commit comments

Comments
 (0)