Skip to content

Commit

Permalink
Make member identifier the address instead of account_id (#1172)
Browse files Browse the repository at this point in the history
* Make member identifier the address instead of account_id

* Lowercase address
  • Loading branch information
neekolas authored Oct 23, 2024
1 parent 894ecf3 commit 854307a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion xmtp_id/src/associations/verified_signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ impl VerifiedSignature {
*block_number = response.block_number;

Ok(Self::new(
MemberIdentifier::Address(account_id.into()),
MemberIdentifier::Address(
account_id.get_account_address().to_string().to_lowercase(),
),
SignatureKind::Erc1271,
signature_bytes.to_vec(),
))
Expand Down
8 changes: 4 additions & 4 deletions xmtp_mls/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,12 +789,12 @@ pub(crate) mod tests {
let contract_call = scw_factory.create_account(owners.clone(), nonce);

contract_call.send().await.unwrap().await.unwrap();
let account_id = AccountId::new_evm(anvil_meta.chain_id, format!("{scw_addr:?}"));
let account_id_string: String = account_id.clone().into();
let account_address = format!("{scw_addr:?}");
let account_id = AccountId::new_evm(anvil_meta.chain_id, account_address.clone());

let identity_strategy = IdentityStrategy::CreateIfNotFound(
generate_inbox_id(&account_id_string, &0),
account_id_string,
generate_inbox_id(&account_address, &0),
account_address,
0,
None,
);
Expand Down

0 comments on commit 854307a

Please sign in to comment.