Skip to content

Bug: convert tool does not update currentValue between operations #17

@dinitheth

Description

@dinitheth

Issue: convert Tool Does Not Update currentValue

The convert tool applies a sequence of operations on an input value, such as:

  • toHex
  • toString
  • parseUnits
  • etc.

However, the result of each operation is not stored back into the currentValue. Instead, every operation uses the original input, leading to incorrect final results.


Why This Matters

  • Incorrect Behavior: Each operation should be chained — using the output of the previous step as the input to the next.
  • User Confusion: The final result will not reflect the intended transformations.
  • Debugging Difficulty: Logs may mislead developers because they don’t reflect actual transformations.

Example Problem

Given:

{
  "input": "100",
  "operations": ["toHex", "toString"]
}

The expected result should be:

"100" → "0x64" → "0x64" (as a string)

But instead, both operations run on "100", leading to "0x64" and "100" (wrong).

✅ Proposed Fix

  • Track and update the currentValue after each operation so transformations are chained.

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