Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisht13 committed Oct 22, 2024
1 parent 805b9f2 commit 2541763
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ serde_json = "1.0.68"
tiny_http = "0.12.0"
lettre = { version = "0.10.4", features = ["tokio1", "tokio1-native-tls"] }
ethers = { version = "2.0.10", features = ["abigen"] }
relayer-utils = { version = "0.4.0", git = "https://github.com/zkemail/relayer-utils.git" }
relayer-utils = { git = "https://github.com/zkemail/relayer-utils.git", branch = "fix/clave-depl" }
futures = "0.3.28"
sqlx = { version = "=0.7.3", features = ["postgres", "runtime-tokio"] }
regex = "1.10.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/relayer/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub async fn handle_email(email: String) -> Result<EmailAuthEvent, EmailError> {
})?;
let request_decomposed_def = serde_json::from_str(&request_def_contents)
.map_err(|e| EmailError::Parse(format!("Failed to parse request_def.json: {}", e)))?;
let request_idxes = extract_substr_idxes(&email, &request_decomposed_def)?;
let request_idxes = extract_substr_idxes(&email, &request_decomposed_def, false)?;
if request_idxes.is_empty() {
return Err(EmailError::Body(WRONG_COMMAND_FORMAT.to_string()));
}
Expand Down
7 changes: 5 additions & 2 deletions packages/relayer/src/modules/dkim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,11 @@ pub async fn check_and_update_dkim(
)
})?;
let selector = {
let idxes =
extract_substr_idxes(&parsed_email.canonicalized_header, &selector_decomposed_def)?[0];
let idxes = extract_substr_idxes(
&parsed_email.canonicalized_header,
&selector_decomposed_def,
false,
)?[0];
parsed_email.canonicalized_header[idxes.0..idxes.1].to_string()
};

Expand Down

0 comments on commit 2541763

Please sign in to comment.