I am a bit new to this, so please forgive my misunderstanding but I can’t seem to find an example of sending transactions using the mobile wallet sdk both in the github repo or documentation including mobile spec.
*edit - I did find an example in the docs for the structure to send but I think it would be more helpful to have an example of sending a transaction for future reference (both in the example and used on the mobile sdk docs). I eventually looked through the package to see how a request is structured. The request I am making appears valid and it appears the package checks for values before sending them (if an invalid param is submitted you get an error before you go to the Coinbase app).
In the WalletMobileSDKEVMProvider → it hits a private func that formats it called _prepareTransactionParams() before being passed on to signTransaction func which can tell if its send or sign transaction.
I am able to make basic calls like request accounts and switch networks, but I can’t seem to figure out how to use eth_sendTransaction. I simply want to send 0.01 polygon on the Polygon Mumbai testnet to another Polygon Mumbai testnet account.
I am calling it using this:
const response = await provider.request({
method: 'eth_sendTransaction',
params: [{
from : 'my polygon mumbai Coinbase wallet address'
to: 'another polygon mumbai wallet address',
value: '0x2386f26fc10000' //(0.01 polygon)
}]
});
Upon doing this request, the app forwards to the Coinbase Wallet app, but then an error shows stating that I should close this app or sign out if I have this error.
In other words, something about my request is off.
My thoughts were that I might not have the right ‘from’ address or maybe I have to sign before sending but I am not quite sure.
If anyone can please help me.