Skip to content

Uniswap plugin has ambiguous parameters #341

@nabeelraza-7

Description

@nabeelraza-7

Describe the bug
When using the uniswap plugin, the parameters tokenIn and tokenOut are assumed to be strings but the API request requires them to be addresses

To Reproduce
Sample parameters:

{
  tokenIn: 'WETH',
  tokenOut: 'WBTC',
  amount: '1',
  type: 'EXACT_INPUT',
  protocols: [ 'V2', 'V3' ],
  routingPreference: 'CLASSIC'
}

Error:

{
  "errorCode": "RequestValidationError",
  "detail": "\"tokenIn\" with value \"WETH\" fails to match the required pattern: /^0x[a-fA-F0-9]{40}$/"
}

Expected behavior
There should be some preprocessing that converts this appropriately OR looks up their addresses

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions