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

Missing digest property error when trying to execute hedera-wallet-connect transactions on React Native #121

Open
marelh02 opened this issue Apr 30, 2024 · 1 comment
Labels
Bug A error that causes the feature to behave differently than what was expected based on design docs P1 High priority issue. Required to be completed in the assigned milestone.

Comments

@marelh02
Copy link

Describe the bug
Hi, all the JSON RPC abstractions seem to be working when I create a Wallet on the Web side, but with mobile platforms compatibility issues arise. Firstly, the library throws a "Missing TextEncoder property" error which I managed to solve by installing a library called "text-encoding" (it's deprecated but well). When my mobile wallet receives signature requests from a hedera-wallet-connect DApp, they work just fine. However, whenever transaction execution is involved in a session request (hedera_signAndExecuteTransaction or hedera_executeTransaction) the mobile wallet throws a "Missing digest property error".
What's strange is that if I extract the transaction Id from the tx body, and search for it on hashscan, I find out that the transaction actually succeeded?

To Reproduce

  1. Create a demo mobile wallet with expo (so that the Hedera sdk is supported)
  2. Install hedera-wallet-connect and use it on the wallet side
  3. install text-encoding and import it where hedera-wallet-connect is being used
  4. send hedera_signAndExecuteTransaction or hedera_executeTransaction requests from a demo hedera-wallet-connect DApp
  5. Accept the request on the wallet side

Expected behavior
Normally I would expect no errors to arise if a transaction succeeded and get a normal return object on the dapp side. If there are errors, more precise error messages would be helpful (instead of the ambiguous error we get, tracing it's stack trace leads to an anonymous function)

Screenshots
image

Smartphone

  • Device: Realme C55
  • OS: Android 14
  • Platform: expo 50.0.14

Additional context
When examining the source code of the library, I found out that the the "signer.call( body ) " lines of code in hedera_signAndExecuteTransaction or hedera_executeTransaction are where the errors arise:
image
I tried modifying the source code of the lib to solve the issue, sadly I failed.

@itsbrandondev itsbrandondev added Bug A error that causes the feature to behave differently than what was expected based on design docs P1 High priority issue. Required to be completed in the assigned milestone. labels Aug 3, 2024
@kantorcodes
Copy link
Contributor

@marelh02 Could you provide some example code for what you are experiencing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A error that causes the feature to behave differently than what was expected based on design docs P1 High priority issue. Required to be completed in the assigned milestone.
Projects
None yet
Development

No branches or pull requests

3 participants