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
13 stars 22 forks source link

executeTransaction does not return receipt when signing an AccountCreateTransaction #337

Closed rocketmay closed 4 days ago

rocketmay commented 2 weeks ago

AccountCreateTransaction executeTransaction() Not Returning Receipt

Bug Description

The executeTransaction() function does not return a receipt when signing an AccountCreateTransaction. While the transaction successfully executes on the ledger, the async function doesn't return anything, contrary to expected behavior.

Steps to Reproduce

  1. Create an AccountCreateTransaction (tested with threshold key, non-threshold keys untested)
  2. Freeze the transaction
  3. Execute the transaction
const transaction = new AccountCreateTransaction()
    .setKey(thresholdKey)
    .setAccountMemo("");
const frozen = await transaction.freezeWithSigner(signer);
const receipt = await walletConnect.executeTransaction(frozen);

The transaction can be verified as successful on Hashscan by checking the signer account, but executeTransaction never returns. After several minutes, the following error is caught:

{
  "txError": {},
  "queryError": {
    "name": "Error",
    "message": "(BUG) Query.fromBytes() not implemented for type getByKey",
    "stack": "Error: (BUG) Query.fromBytes() not implemented for type getByKey
    at Query.fromBytes (webpack-internal:///(app-pages-browser)/./node_modules/@hashgraph/sdk/src/query/Query.js:138:19)
    at DAppSigner._tryExecuteQueryRequest (webpack-internal:///(app-pages-browser)/./node_modules/@hashgraph/hedera-wallet-connect/dist/src/lib/dapp/DAppSigner.js:191:77)
    at DAppSigner.call (webpack-internal:///(app-pages-browser)/./node_modules/@hashgraph/hedera-wallet-connect/dist/src/lib/dapp/DAppSigner.js:211:40)
    at async HashinalsWalletConnectSDK.executeTransaction (webpack-internal:///(app-pages-browser)/./node_modules/@hashgraphonline/hashinal-wc/dist/es/hashinal-wc.es.js:1938:26)
    }"
  }
}

Expected Behavior

executeTransaction should return a receipt after the transaction is executed.

Environment

OS: Linux Browser: Chrome (using Chrome HashPack extension) HashPack Version: 11.0.2

kantorcodes commented 1 week ago

We've confirmed the following PR fixes this: https://github.com/hashgraph/hedera-wallet-connect/pull/339 (canary: 1.3.7-canary.813a6d2.0)

Will close once merged.