We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8996aa2 commit e3ea9cbCopy full SHA for e3ea9cb
server/src/http/dyn_contract.rs
@@ -198,8 +198,7 @@ impl ContractCall {
198
fn extract_function_name(&self, method: &str) -> Result<String, EngineError> {
199
let trimmed = method.trim();
200
201
- if trimmed.starts_with("function ") {
202
- let after_function = &trimmed[9..];
+ if let Some(after_function) = trimmed.strip_prefix("function ") {
203
if let Some(paren_pos) = after_function.find('(') {
204
return Ok(after_function[..paren_pos].trim().to_string());
205
}
0 commit comments