Skip to content

Commit 9583209

Browse files
committed
fix error reporting for erc1271 verification
1 parent f10c10e commit 9583209

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

aa-core/src/signer.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ use alloy::{
44
dyn_abi::TypedData,
55
primitives::{Address, B256, hex, keccak256},
66
sol,
7-
sol_types::{SolCall, SolValue, decode_revert_reason, eip712_domain},
7+
sol_types::{SolCall, SolValue, eip712_domain},
88
};
99
use engine_core::{
1010
chain::Chain,
1111
credentials::SigningCredential,
12-
error::EngineError,
12+
error::{ContractErrorToEngineError, EngineError},
1313
signer::{AccountSigner, EoaSigner, EoaSigningOptions, Erc4337SigningOptions},
1414
};
1515
use serde::Serialize;
@@ -266,7 +266,9 @@ impl<C: Chain + Clone> SmartAccountSigner<C> {
266266
let expected_magic = ERC1271Contract::isValidSignatureCall::SELECTOR;
267267
Ok(response.as_slice() == expected_magic)
268268
}
269-
Err(e) => Ok(false),
269+
Err(e) => {
270+
Err(e.to_engine_error(self.chain.chain_id(), Some(self.smart_account.address)))
271+
}
270272
}
271273
}
272274

0 commit comments

Comments
 (0)