From f2de811116d51812cc73fdc4ca0a47ab54d3b0b6 Mon Sep 17 00:00:00 2001 From: yoduyodu Date: Fri, 5 Apr 2024 14:55:28 -0700 Subject: [PATCH] resolve comments --- xmtp_id/src/erc1271_verifier.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xmtp_id/src/erc1271_verifier.rs b/xmtp_id/src/erc1271_verifier.rs index d956555c4..1d17ad2c1 100644 --- a/xmtp_id/src/erc1271_verifier.rs +++ b/xmtp_id/src/erc1271_verifier.rs @@ -29,24 +29,23 @@ impl ERC1271Verifier { /// /// # Arguments /// - /// * `wallet_address` - Address of the ERC1271 wallet. + /// * `contract_address` - Address of the ERC1271 wallet. /// * `block_number` - Block number to verify the signature at. /// * `hash`, `signature` - Inputs to ERC-1271, used for signer verification. pub async fn is_valid_signature( &self, - wallet_address: Address, + contract_address: Address, block_number: Option, hash: [u8; 32], signature: Bytes, ) -> Result { - let erc1271 = ERC1271::new(wallet_address, self.provider.clone()); + let erc1271 = ERC1271::new(contract_address, self.provider.clone()); let res: [u8; 4] = erc1271 .is_valid_signature(hash, signature) .block(block_number.unwrap_or_default()) .call() - .await? - .into(); + .await?; Ok(res == EIP1271_MAGIC_VALUE) }