hashgraph / hedera-wallet-connect

This package is a messaging relay between decentralized applications and wallets in Hedera network based on Wallet Connect relays.
Apache License 2.0
7 stars 15 forks source link

executeWithSigner, different IMPL from different Wallet Providers? #187

Closed AdrianKBL closed 4 days ago

AdrianKBL commented 2 weeks ago

We have received reports from various DApps integrating WalletConnect, experiencing different behaviors between different wallet providers when using .executeWithSigner().

The official WalletConnect implementation does not wait for the receipt. However, it appears that the implementation in HashPack waits for the receipt, while the Kabila Wallet returns the TransactionResponseJSON directly. This discrepancy is causing issues, such as the Davinci team encountering "Contract Revert" or "SUCCESS" responses in HashPack but not receiving any response in other wallet providers.

The official WalletConnect implementation only performs: await signer.call(body).toJSON(). Could you give us some light in this issue @teacoat

Thanks.

psychoter commented 2 weeks ago

As a dapp development team, all we really need is to get an error from the wallets when a smart contract call is reverted. I’m not sure why this isn’t standard. The hedera-wallet-connect package docs don’t explain how a dapp can tell when a call has been reverted, which means either the wallet should tell us or we have to handle it on our backend. This seems like a missed opportunity for making things easier on our end.

I must mention I don't have a full understanding of how Walletconnect ecosystem works.

teacoat commented 2 weeks ago

@AdrianKBL I see what you mean, apparently we should only be returning precheck codes rather than any error response code, will update