status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.89k stars 985 forks source link

The additional route is not built in the "sent to" page if the entered value is more than available on the particular network #20486

Closed VolodLytvynenko closed 2 months ago

VolodLytvynenko commented 3 months ago

Steps:

  1. Go to the send transaction flow.
  2. Add the multichain address in the 'TO' input field (all available networks must be included in the recipient address).
  3. Enter a value on the "Send To" page that is available only on one network (e.g., User has 0.01 on Arbitrum, 0.006 on Optimism, 0.005 on Ethereum. Entered value within the range of available netwrok In my case = 0.007 eth).
  4. After a route is found (in my case, Arbitrum), go to the 'Custom' tab.
  5. Set up the available amount for an additional network (e.g., 0.001 for Optimism).
  6. Check the routes.

Actual result:

Routes are not found.

DESKTOP:

https://github.com/status-im/status-mobile/assets/52490791/8067eed9-ef33-49ec-a343-80852d42e547

MOBILE:

https://github.com/status-im/status-mobile/assets/52490791/22fd7785-32d4-401c-a86a-faff7615380b

Expected result:

The amount should be distributed among networks in the following way:

  1. Optimism 0.001 -> Optimism
  2. Arbitrium 0.006- > Arbitrium

Logs:

desktop routes.txt

ENV:

Pixel 7a, Android 13 iPhone 11 Pro Max, IOS 17 Desktop 0.9.90, Status Go 0.179.9

VolodLytvynenko commented 3 months ago

Potentially, it should be fixed by https://github.com/status-im/status-go/pull/5426

J-Son89 commented 3 months ago

@VolodLytvynenko - I'm a bit confused by the video of desktop here. From what I understand from talking with @xAlisher , it shouldn't be able to look for a route if the custom routes are not matching the total of the main router value. e.g in the desktop video - in this case total-value is 0.007 and there is only one network set with a value (optimism 0.001) so the total of the custom amounts doesn't match the full amount? 🤔 Or am I missing something? i.e the user should also add the 0.006 in some other network.

VolodLytvynenko commented 3 months ago

@VolodLytvynenko - I'm a bit confused by the video of desktop here. From what I understand from talking with @xAlisher , it shouldn't be able to look for a route if the custom routes are not matching the total of the main router value. e.g in the desktop video - in this case total-value is 0.007 and there is only one network set with a value (optimism 0.001) so the total of the custom amounts doesn't match the full amount? 🤔 Or am I missing something? i.e the user should also add the 0.006 in some other network.

@J-Son89 It should recalculate for other unlocked networks where assets are available.

In my case:

  1. User enters 0.007 ETH as the total value.
  2. User sets 0.001 ETH for Optimism and locks it (meaning the other amount should be recalculated by other networks where assets are available, except the current network with 0.001 ETH locked).

So, for all unlocked networks, recalculation should occur. By default, the rest of the networks are unlocked, so without manual adjustment, 0.006 ETH should be allocated to the remaining networks automatically

J-Son89 commented 2 months ago

I will close this issue for now as Multi-chain routing is descoped for 2.31 and by 2.30 we will remove route customisation/locking