You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scenario is the following: You create a transaction, serialize it, deserialize it, and only freeze it, without signing it.
After that serialize it again and when you try to deserialize it, the following error is thrown: "failed to validate transaction bodies"
Steps to reproduce
Run the following snippet:
const {
AccountUpdateTransaction,
Client,
TransactionId,
Timestamp,
AccountId,
Transaction,
} = require('@hashgraph/sdk');
async function run() {
// Setting up Client
const client = Client.forTestnet();
// Creating Transation ID
const accountId = AccountId.fromString('0.0.2159149');
const transactionId = new TransactionId(
accountId,
Timestamp.fromDate(new Date())
);
// Creating a transaction
const transaction = new AccountUpdateTransaction()
.setTransactionId(transactionId)
.setAccountId(accountId)
.setAccountMemo('Hello');
// Serializing the transaction
const bytes = transaction.toBytes();
// Sending...
// Deserialize when received
const transactionToFreeze = Transaction.fromBytes(bytes);
// Freeze the transaction
transactionToFreeze.freezeWith(client);
// Serialize it again and send it
const newBytes = transactionToFreeze.toBytes();
// Deserializing the frozen transaction
const frozenTransaction = Transaction.fromBytes(newBytes);
client.close();
}
run();
Additional context
No response
Hedera network
other
Version
v2.42.0-beta.2
Operating system
None
The text was updated successfully, but these errors were encountered:
Description
The scenario is the following: You create a transaction, serialize it, deserialize it, and only freeze it, without signing it.
After that serialize it again and when you try to deserialize it, the following error is thrown:
"failed to validate transaction bodies"
Steps to reproduce
Additional context
No response
Hedera network
other
Version
v2.42.0-beta.2
Operating system
None
The text was updated successfully, but these errors were encountered: