From 807e465b754b75cdd3c0b081f8b525ecaa22fe85 Mon Sep 17 00:00:00 2001 From: Dimitri Date: Thu, 19 Sep 2024 14:14:03 +0700 Subject: [PATCH] Rename func to extract_template_vals_from_command --- packages/relayer/src/modules/web_server/rest_api.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/relayer/src/modules/web_server/rest_api.rs b/packages/relayer/src/modules/web_server/rest_api.rs index 8b0093d0..e17988fe 100644 --- a/packages/relayer/src/modules/web_server/rest_api.rs +++ b/packages/relayer/src/modules/web_server/rest_api.rs @@ -3,7 +3,9 @@ use anyhow::Result; use axum::Json; use hex::decode; use rand::Rng; -use relayer_utils::{calculate_account_salt, extract_template_vals, TemplateValue, LOG}; +use relayer_utils::{ + calculate_account_salt, extract_template_vals_from_command, TemplateValue, LOG, +}; use serde::{Deserialize, Serialize}; use std::str; @@ -60,7 +62,7 @@ pub async fn handle_acceptance_request( .await?; // Extract and validate command parameters - let command_params = extract_template_vals(&payload.command, command_template) + let command_params = extract_template_vals_from_command(&payload.command, command_template) .map_err(|_| ApiError::Validation("Invalid command".to_string()))?; // Recover the account address @@ -185,7 +187,7 @@ pub async fn handle_recovery_request( .await?; // Extract and validate command parameters - let command_params = extract_template_vals(&payload.command, command_template) + let command_params = extract_template_vals_from_command(&payload.command, command_template) .map_err(|_| ApiError::Validation("Invalid command".to_string()))?; // Recover the account address