Skip to content

SOR - Make input validation more robust #1826

Closed
@brunoguerios

Description

@brunoguerios
export function isValidSwapRequest(tokenIn: string, tokenOut: string, swapAmount: string, chain: Chain): boolean {
    if (parseFloat(swapAmount) <= 0) {

I think this might throw if some random string is provided or a number in scientific notation. Should check this here as well

Originally posted by @franzns in #1808 (comment)

Metadata

Metadata

Assignees

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