Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_sendTransaction different behavior on Smartphone than on desktop browser #3022

Closed
andrekat opened this issue Aug 14, 2021 · 3 comments
Closed
Labels
community Issues or PRs opened by the MM community type-bug Something isn't working

Comments

@andrekat
Copy link

Hey!

I am sending a transaction to call a method of a smart contract. The code is working fine on my desktop, where he sends the transaction to the contract address (as specified in the "to" field). However … on my phone or in the MetaMask app itself, it tries to deploy a contract and therfore the transaction fails?!

This is the code I am using to send the transaction (using “request”)

.request({
method: "eth_sendTransaction",
params: [{
"from": "VALIDADDRESS",
"to": "CONTRACTADDRESS",
"data": "HASH_OF_INVOKED_METHOD_SIGNATURE_AND_ENCODED_PARAMETERS"
}]

Transaction sent through MetaMask Mobile:
image

Transaction sent through MetaMask Desktop Extension (works as expected)
image

What is going on here? Did i miss something?

Expected behavior
Same behavior on smartphone as on desktop

Smartphone (please complete the following information):

  • Device: IPhone 12 Pro Max
  • OS: iOS 14.6
  • App Version: v.3.0.1 (didn't work in previous version as well)

to be added after bug submission by internal support / PM
Severity

  • How critical is the impact of this bug on a user?
  • Add stats if available on % of customers impacted
  • Is this visible to all users?
  • Is this tech debt?
@AndriiKD
Copy link

AndriiKD commented Aug 16, 2021

Have differene result, but also eth_sendTransaction has different behavior on Smartphone than on desktop browser
#3016

@andrekat
Copy link
Author

To overcome this issue right now:

  1. Use the approve() function of an BEP-20 / ERC-20 - this does somehow work on phone (app) and desktop browser

  2. Use transferFrom() on the server side

@gantunesr gantunesr added the community Issues or PRs opened by the MM community label Aug 17, 2021
@andrepimenta
Copy link
Member

Related to #2744. Working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues or PRs opened by the MM community type-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants