Skip to content

[asset_path_payment] No check that path entries are unique addresses #861

Description

@Wilfred007

Description

The path-payment routing logic in complete_path_payment builds a Vec<Address> representing the conversion path but never checks for duplicate addresses within that path. A caller could submit the same intermediate asset twice, which doesn't fail outright but produces a confusing or misleading path that doesn't reflect a real conversion route.

Where

contracts/asset_path_payment/src/lib.rs (path validation block, ~line 148-158)

Acceptance Criteria

  • Reject payment initiation when the path vector contains a duplicate address
  • Add a unit test covering the duplicate-path rejection case
  • Document the constraint in the function's doc comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractSmart Contract developmentmediumModerate tasks

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions