diff --git a/packages/relayer/.env.example b/packages/relayer/.env.example index 5b1428cb..0f696907 100644 --- a/packages/relayer/.env.example +++ b/packages/relayer/.env.example @@ -6,7 +6,7 @@ CHAIN_ID=11155111 # Chain ID of the testnet. SMTP_SERVER= -PROVER_ADDRESS="https://zkemail--email-auth-prover-body-parsing-v1-0-0-flask-app.modal.run" +PROVER_ADDRESS="https://zkemail--email-auth-prover-v1-3-0-flask-app.modal.run" DATABASE_URL= "postgres://test@localhost/emailauth_test" RELAYER_EMAIL_ADDR= diff --git a/packages/relayer/src/core.rs b/packages/relayer/src/core.rs index bc28757e..9939ab04 100644 --- a/packages/relayer/src/core.rs +++ b/packages/relayer/src/core.rs @@ -289,6 +289,8 @@ pub async fn handle_email(email: String) -> Result { proof: email_proof.clone(), }; + println!("Email Auth Msg: {:?}", email_auth_msg); + match CLIENT .handle_recovery( &request.controller_eth_addr, diff --git a/packages/relayer/src/utils/subject_templates.rs b/packages/relayer/src/utils/subject_templates.rs index fbffde21..e8ccd734 100644 --- a/packages/relayer/src/utils/subject_templates.rs +++ b/packages/relayer/src/utils/subject_templates.rs @@ -102,12 +102,13 @@ pub fn extract_template_vals(input: &str, templates: Vec) -> Result") { + string = string.split("").collect::>()[0].to_string(); + } template_vals.push(TemplateValue::String(string)); } "{uint}" => { @@ -119,7 +120,11 @@ pub fn extract_template_vals(input: &str, templates: Vec) -> Result") { + uint_match = uint_match.split("").collect::>()[0]; + } + let uint = U256::from_dec_str(uint_match).unwrap(); template_vals.push(TemplateValue::Uint(uint)); } "{int}" => { @@ -130,7 +135,11 @@ pub fn extract_template_vals(input: &str, templates: Vec) -> Result") { + int_match = int_match.split("").collect::>()[0]; + } + let int = I256::from_dec_str(int_match).unwrap(); template_vals.push(TemplateValue::Int(int)); } "{decimals}" => { @@ -143,7 +152,10 @@ pub fn extract_template_vals(input: &str, templates: Vec) -> Result") { + decimals = decimals.split("").collect::>()[0].to_string(); + } template_vals.push(TemplateValue::Decimals(decimals)); } "{ethAddr}" => {