Function: updatePath(IRouter.Path path, bool updatingAll)
This updates the path information used for swaps.
Inputs
path
Control: Fully controlled.
Constraints: The
toAmountMin
fields inpath.BToD
andpath.DToB
must be greater than zero.Impact: The new path info.
updatingAll
Control: Fully controlled.
Constraints: No constraints.
Impact: If true, it will update all path info; if false, it will only update
toAmountMin
and theupdated
timestamp.
Branches and code coverage (including function calls)
Intended branches
The function updates the path info --- either all fields or just
toAmountMin
andupdated
.
Negative behavior
The function reverts if
toAmountMin
fields inpath.BToD
orpath.DToB
are zero.The function reverts if
updatingAll
is true and the route info or token placement is invalid.