No, It doesānt return anything if it was signed from from mobile wallets.
But it works fine with metamask browser extension.
We need time to check. Do you use IOS or Android?
My phone is android OS
We have the same issue when using wallet connect on IOS device
versions
āmoralisā: ā^0.0.90ā,
āreact-moralisā: ā^0.2.6ā,
ā@walletconnect/web3-providerā: ā^1.6.5ā,
Hi @sakhro
We will add callback event support for the executeFunction
in coming days
Weāll keep in touch with you
Hi, I think that the functionality was added, can you try now?
i have exactly the same issue. the call functions all work. but the send functions donāt with walletconnect.
const receipt = await Moralis.executeFunction(options);
console.log(receipt)
this code just executes nothing for meā¦
I think that you should use events, events should work in latest Moralis sdk version, but that code should still send the transaction.
what do you mean? what events should i be using?
const tx = await Moralis.executeFunction(options);
tx.on("transactionHash", (hash) => { console.log(hash) })
.on("receipt", (receipt) => { console.log(receipt) })
.on("confirmation", (confirmationNumber, receipt) => { console.log(confirmationNumber,receipt) })
.on("error", (error) => { console.log(error) });
Can you try this and see if any of these events fire and print to console (transactionHash, receipt etc)
It shows nothing in the consoleā¦ when I use walletconnect with either metamast or trustwallet. I can connect. It does perform a read call. But when I make a transaction. Mrtamask/trustwallet doesnāt even open. Just nothing happens when I click the button. With normal mrtamask login. Everything does work.
I used https://docs.moralis.io/moralis-server/web3/web3 to make the dapp
can you share what you passed as options? did you use awaitReceipt = false
?
const options = {
contractAddress: "0xf684a651674046ce211b4956235ac001a96b3333",
functionName: "mintForUser",
abi: ABI,
params: {
user: address
},
};
const tx = await Moralis.executeFunction(options);
tx.on("transactionHash", (hash) => { console.log(hash) })
.on("receipt", (receipt) => { console.log(receipt) })
.on("confirmation", (confirmationNumber, receipt) => { console.log(confirmationNumber,receipt) })
.on("error", (error) => { console.log(error) });
This is the code i used. (ABI is the whole ABI)
For metamask login it works perfectly. But with walletconnect, the wallet doesnāt even open when I start this function.
can you try a syntax similar to this one?
mainly using awaitReceipt = false
and using Moralis.enableWeb3({ provider: 'walletconnect' })
Yup. Same thing with awaitReceipt: false. Nothing shows up in console. And trustwallet doesnāt open with the transaction. Just a button and nothing happensā¦
Iāll need some time to test it, can you share a minimal html + js example that doesnāt work for you?
Wait i think I found something. Is there a function on how to check which provider is used?
So I can make an if function. If provider of connected = trustwallet. Do this
Else do this
I think that you can identify if it is wallet connect or not: Moralis authenticate ios/ android / trustwallet and more
for trust wallet in particular, you may get in another problem later: Wallet connect takes me to trust wallet page
const provider = window.localStorage.walletconnect ? "walletconnect": "Metamask";
if i first connect with walletconnect. and then disconnect and connect with metamask. it gives me walletconnect as outputā¦
when i clear my cookies and i use metamask. it returns metamask. but when i first use walletconnect. then refresh and connect with metamask (without clearing cookies) i only get walletconnect as output.