Skip to content

deconstruct_task_metadata() returns task details without task identifier in automation_registry.move module #336

@supra-yoga

Description

@supra-yoga

Description

The automation_registry::deconstruct_task_metadata() function comment claims "Retrieves specific metadata details of an automation task entry by its task index", but the function neither accepts a task index parameter nor returns the task_index field from the metadata struct. Function signature is incorrect and misleading.

/// Retrieves specific metadata details of an automation task
/// entry by its task index.
public fun deconstruct_task_metadata(
    task_metadata: &AutomationTaskMetaData
): (address, vector<u8>, u64, vector<u8>, u64, u64, u64, vector<vector<u8>>, u64, u8, u64) 
    {
        (
        // task_metadata.task_index is MISSING
        ...
        task_metadata.state,
        task_metadata.locked_fee_for_next_epoch
        )
    }

Recommendation

Option 1: Fix the function to match comment
Option 2: Fix the comment to match function

Decide on the behaviour of the function and update accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions