Description
When generating a transaction hex (txHex) using makeUnsignedContractCall from @stacks/transactions and sending it to Leather Wallet for signing, we encounter two distinct issues depending on the library version:
- Version 7.0.4 (latest at the time): The Leather popup opens but displays "DeserializationError: Cannot recognize Clarity Type: 48", and the "Confirm" button is not clickable.
- Version 6.13.0: The popup opens, but signing fails with a generic error
{ "jsonrpc": "2.0", "id": "...", "error": {} }, and no specific error message is provided.
This prevents users from confirming and signing the transaction in a presale widget.
Steps to Reproduce
- Install
@stacks/[email protected] (or @stacks/[email protected]).
- Create a transaction with
makeUnsignedContractCall using these options:
{
"contractAddress": "ST2HTPFD9QDXZZGQ2FA4TXKH30PX3YHST0H4JFE0E",
"contractName": "cat-presale-f3",
"functionName": "buy-tokens",
"functionArgs": [{"type": 1, "value": "150000000"}],
"network": "testnet",
"senderAddress": "STMN839RM7GAG79Y9574TTZMEKHKKR6RNZC71CDR",
"fee": "5000",
"nonce": "85"
}