Skip to content

Commit

Permalink
Apply cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
wshino committed Oct 30, 2024
1 parent 56988b7 commit 52d584d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/relayer/src/modules/mail.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::*;
use crate::core::EmailRequestContext;
use crate::*;
use handlebars::Handlebars;
use serde::{Deserialize, Serialize};
use serde_json::Value;
Expand Down Expand Up @@ -149,14 +149,13 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<(), EmailError>
email_request_context,
command,
} => {

// Send error notification to system user if this is a contract call error
if let (Some(email_request_context), Some(command)) = (email_request_context, command) {
let recipient_email = ERROR_EMAIL_ADDR
.get()
.expect("ERROR_EMAIL_ADDR must be set before use")
.clone();

let body_plain = format!(
"Error: {}\n\n\
Request ID: {}\n\
Expand All @@ -181,7 +180,10 @@ pub async fn handle_email_event(event: EmailAuthEvent) -> Result<(), EmailError>
"email": email_request_context.email,
});

let subject = format!("[Error] Request ID: {}", email_request_context.request.request_id);
let subject = format!(
"[Error] Request ID: {}",
email_request_context.request.request_id
);
let body_html = render_html("error_for_admin.html", render_data).await?;

let email = EmailMessage {
Expand Down

0 comments on commit 52d584d

Please sign in to comment.