Skip to content

Copilot suggestion for jsonrpc #736

@mpolitzer

Description

@mpolitzer

Copilot said:

handleGetMatchAdvanced slices params.Parent[2:] to remove the 0x prefix and leaves a TODO. Since config.ToHashFromString already parses/validates the value, consider reusing that parsed hash (or update GetMatchAdvanced to accept 0x-prefixed hex) to avoid duplicating parsing logic and relying on string slicing in a request handler.

-		params.TournamentAddress, params.IDHash, params.Parent[2:]) // TODO: use parsed value
+		params.TournamentAddress, params.IDHash, strings.TrimPrefix(params.Parent, "0x"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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