status-im / status-mobile

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

Unable to send tokens which are available only on L1 network #21292

Closed pavloburykh closed 1 month ago

pavloburykh commented 1 month ago

Fro reproduction you can use SNT

Steps:

  1. Restore the account which has SNT
  2. Proceed with sending flow
  3. See if the routes are built after entering valid amount

Actual result:

Status-debug-logs - 2024-09-19T171851.912.zip

On mobile I receive different errors, like transfer amount exceeds balance or not available for chain ID

photo_2024-09-19 17 04 50 photo_2024-09-19 17 04 55

Same on Desktop:

Status Desktop 2024-09-19 17-09-01

cc @saledjenic @anastasiyaig

Additional Information

anastasiyaig commented 1 month ago

i was able to send snt just 2 days ago. i dont have any context besides that. maybe something got broken recently

@virginiabalducci can you pls check?

virginiabalducci commented 1 month ago

I was able to do a send tx in testnet but I'm reproducing the same issue in mainnet Screenshot 2024-09-19 at 11 28 57 AM

https://github.com/user-attachments/assets/0112d279-f6ec-45c9-9eab-958dbf00f5c4 app_20240917_124336.log

If needed, adding addresses I tested with: From: 0x32e12fd7c2c7984dd6de153691d901445fc8aa07 To: 0x69af29dedbe58f4001bcf14803963cb7894112b3

anastasiyaig commented 1 month ago

thanks @virginiabalducci @saledjenic @dlipicar do you know the root cause?

saledjenic commented 1 month ago

@virginiabalducci I was able to reproduce your case with 0x32e12fd7c2c7984dd6de153691d901445fc8aa07 address.

So let's analyze it:

To summarize and conclude, there is no error in the router logic. @virginiabalducci @anastasiyaig @pavloburykh @alwx

pavloburykh commented 1 month ago

To summarize and conclude, there is no error in the router logic. @virginiabalducci @anastasiyaig @pavloburykh @alwx

Thank you for the comment @saledjenic

I have couple of questions here:

  1. Regarding insufficient funds error: we have an open issue https://github.com/status-im/status-mobile/issues/20970. Could you please leave a comment in that issue summarising your findings regrading this problem. I remember that recently there have been much discussions in different Discord channels, but unfortunately there is no summary in the ticket. Currently we are not able to perform L1-L1 transactions in Status app, at the same time I am able to perform same transaction with the same account using Metamask.

  2. At which point do we understand that token is available only on L1 and thus there is no sense to try building any routes except L1-L1? Can we prevent from trying to perform mainnet -> optimism (bridge), mainnet -> arbitrum (bridge) etc steps if we know that only mainnet-mainnet is available? To be honest, this is very confusing that we are showing user the irrelevant errors like transfer amount exceeds balance or not available for chain ID while app UI shows that we are trying to build L1-L1 route and both errors have nothing to do with L1-L1 in this case. Why we are not showing insufficient funds here which is related to L1-L1 route building?

churik commented 1 month ago

I believe we can close https://github.com/status-im/status-mobile/issues/21292 in favour of https://github.com/status-im/status-mobile/issues/20970 and wait for new RPC provider integration 🤞

anastasiyaig commented 1 month ago

i would suggest to check proxy logic since the issue was not on the router side, but on proxy. So querying Infura directly was just fine. Replacing provider wont help in this specific case. There is an explanation in https://github.com/status-im/status-mobile/issues/20970 @churik

churik commented 1 month ago

There is no actually one conclusion (as it was checked with disabled both grove and proxy), and the discussion moved there, but yeah, seems that the issue might be on both sides - grove and proxy. Thanks for the comment. I'll bring this issue today on the wallet sync