Currently None is passed as the minimum swap return amounts when paying by swap. In a heavy MEV environment this could lead to people paying too much in fees. This PR surfaces the optional max_fee parameter so that wallets can (and ideally should) set this to a sensible value to ensure that there is a limit to how much a MEV bot could manipulate the fx rates and the transaction still succeed.
Currently
None
is passed as the minimum swap return amounts when paying by swap. In a heavy MEV environment this could lead to people paying too much in fees. This PR surfaces the optionalmax_fee
parameter so that wallets can (and ideally should) set this to a sensible value to ensure that there is a limit to how much a MEV bot could manipulate the fx rates and the transaction still succeed.