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

fix: WalletConnect: operationHash and hash for tezos_send #2278

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

dianasavvatina
Copy link
Contributor

Proposed changes

Adding a backwards compatible change to result for tezos_send operation to become compatible with TrustWallet and WalletConnect spec at the same time.

The result of tezos_send operation in WalletConnect should look like this according to the spec:
https://docs.reown.com/advanced/multichain/rpc-reference/tezos-rpc

"result":  {
        "operationHash": "op..."
    }

But the actual implementation in 3 places returns this:

"result":  {
        "hash": "op..."
    }

A hash field is returned instead of the operationHash.
The implementation returns hash in

A backward compatible change is implemented to return both fields:

"result":  {
        "hash": "op..."
        "operationHash": "op..."
    }

Later, TrustWallet will be able to make a smooth switch to become compatible with the spec.

Types of changes

  • Bugfix
  • New feature
  • Refactor
  • Breaking change
  • UI fix

Steps to reproduce

With Taquito test dapp:

  1. go to https://taquito-test-dapp.pages.dev/
  2. connect to umami via WalletConnect
  3. send test
  • before the change: the test will fail as hash is not found in the response
  • after the change: the test will pass

With TezosProvider dapp:

  1. install Reown example TezosProvider dapp: PR#697
  2. connect to umami via WalletConnect
  3. send test
  • before the change: dapp will receive "hash" field
  • after the change: the test will receive both fields. Example:

Screenshots

image

Checklist

  • Tests that prove my fix is effective or that my feature works have been added
  • Documentation has been added (if appropriate)
  • Screenshots are added (if any UI changes have been made)
  • All TODOs have a corresponding task created (and the link is attached to it)

Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
umami-embed-iframe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 10:34am
umami-embed-iframe-ghostnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 10:34am
umami-v2-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 10:34am
umami-v2-web-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 10:34am

@dianasavvatina dianasavvatina merged commit de16f6c into main Dec 18, 2024
10 checks passed
@dianasavvatina dianasavvatina deleted the back_hash branch December 18, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants