Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d524b7f3d |
@@ -1197,9 +1197,8 @@ exact-in actions from the input end and a chain of exact-out actions from the
|
|||||||
output end, so a step whose swap actions are all of one kind is lined up from
|
output end, so a step whose swap actions are all of one kind is lined up from
|
||||||
what the user pays to what the user receives. A step that mixes the two kinds
|
what the user pays to what the user receives. A step that mixes the two kinds
|
||||||
need not be: one that buys WETH with USDT exact-in and then USDC with that WETH
|
need not be: one that buys WETH with USDT exact-in and then USDC with that WETH
|
||||||
exact-out is lined up with the USDC purchase first, so with no `SETTLE`,
|
exact-out is lined up with the USDC purchase first. `Amount` is the first
|
||||||
`SETTLE_ALL`, `TAKE` or `TAKE_ALL` it reads `Swap WETH → WETH`. `Amount` is the
|
action's `amountIn`, shown only when that action spends the step's input
|
||||||
first action's `amountIn`, shown only when that action spends the step's input
|
|
||||||
currency, and `Min. received` the last action's `amountOutMin`, shown only when
|
currency, and `Min. received` the last action's `amountOutMin`, shown only when
|
||||||
that action buys the step's output currency, so no figure is shown against a
|
that action buys the step's output currency, so no figure is shown against a
|
||||||
currency it is not counted in. The decoder reads no amount from an exact-out
|
currency it is not counted in. The decoder reads no amount from an exact-out
|
||||||
|
|||||||
+12
-13
@@ -414,19 +414,18 @@ function decodeV4SwapAction(actionId, param) {
|
|||||||
// its output currency, wherever in the step they stand. A side neither one
|
// its output currency, wherever in the step they stand. A side neither one
|
||||||
// names is read from the swap actions, lined up as the exact-out actions in
|
// names is read from the swap actions, lined up as the exact-out actions in
|
||||||
// reverse order, then the exact-in actions in the order they appear. The
|
// reverse order, then the exact-in actions in the order they appear. The
|
||||||
// input comes from the first action in that line and the output from the
|
// input comes from the first action in that line and the output
|
||||||
// last. The router runs exact-in actions from the input end and a chain of
|
// from the last. The router runs exact-in actions from the input end and a
|
||||||
// exact-out actions from the output end, so a step whose swap actions are all
|
// chain of exact-out actions from the output end, so a step whose swap actions
|
||||||
// of one kind is lined up from what the user pays to what the user receives.
|
// are all of one kind is lined up from what the user pays to what the user
|
||||||
// A step that mixes the two kinds need not be: one that buys WETH with USDT
|
// receives. A step that mixes the two kinds need not be: one that buys WETH
|
||||||
// exact-in and then USDC with that WETH exact-out is lined up with the USDC
|
// with USDT exact-in and then USDC with that WETH exact-out is lined up with
|
||||||
// purchase first, so with no SETTLE, SETTLE_ALL, TAKE or TAKE_ALL both its
|
// the USDC purchase first. Amount is the first action's amountIn, kept only
|
||||||
// sides are WETH. Amount is the first action's amountIn, kept only when that
|
// when that action spends the step's input currency, and Min. received the
|
||||||
// action spends the step's input currency, and Min. received the last
|
// last action's amountOutMin, kept only when that action buys the step's
|
||||||
// action's amountOutMin, kept only when that action buys the step's output
|
// output currency, so a figure is never shown against a currency other than
|
||||||
// currency, so a figure is never shown against a currency other than the one
|
// the one it is counted in. A swap action that could not be read keeps its
|
||||||
// it is counted in. A swap action that could not be read keeps its place in
|
// place in the line and states nothing.
|
||||||
// the line and states nothing.
|
|
||||||
function decodeV4Swap(input) {
|
function decodeV4Swap(input) {
|
||||||
try {
|
try {
|
||||||
const d = coder.decode(["bytes", "bytes[]"], input);
|
const d = coder.decode(["bytes", "bytes[]"], input);
|
||||||
|
|||||||
Reference in New Issue
Block a user