LedgerHQ / LedgerHQ/python-erc7730

Wrong value for resolved field path

Open
#114 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
13
Avg merge
14d 5h
Merged PRs (30d)
5

Description

In erc7730 json schema, a path field is declared as

"path": {
            "title": "Path",
            "type": "string",
            "description": "A path to the field in the structured data. The path is a JSON path expression that can be used to extract the field value from the structured data."
        },

But when applying resolve command we get a complex path object instead of a simple string.
In the following exemple when resolving tether.json, the path for _to param value should be

  "path" : "_to"

but we get:

          "transfer(address,uint256)": {
              "intent": "Send",
              "fields": [
                  {
                      "path": {
                          "type": "data",
                          "absolute": true,
                          "elements": [
                              {
                                  "type": "field",
                                  "identifier": "_to"
                              }
                          ]
                      },

Did I miss something?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the ERC-7730 JSON schema, the resolve command, and tether.json, but no repository files or tests. Start by tracing how resolve builds the field path object and compare it with the schema's string declaration and the expected _to output. Done means the resolved path follows the declared schema and the tether.json example produces the expected representation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.