Skip to content

Commit

Permalink
Rename func to extract_template_vals_from_command
Browse files Browse the repository at this point in the history
  • Loading branch information
DimiDumo committed Sep 19, 2024
1 parent c099054 commit 807e465
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/relayer/src/modules/web_server/rest_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 807e465

Please sign in to comment.