Skip to content

Commit

Permalink
release: v2.42.0 beta.3 (#2148)
Browse files Browse the repository at this point in the history
* chore: formatting

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>

* chore: update version and changelog

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>

* chore: formatting

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>

---------

Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
  • Loading branch information
svetoslav-nikol0v authored Feb 22, 2024
1 parent 2895a6c commit b3ea831
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v2.42.0-beta.3

## What's Changed

* fix: deserialize the FileAppendTransaction by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2145
* chore: ensure CI release workflow properly handles prerelease builds by @nathanklick in https://github.com/hashgraph/hedera-sdk-js/pull/2142
* fix: update copy of transaction in transaction list by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2139

## v2.42.0-beta.2

## What's Changed
Expand Down
13 changes: 8 additions & 5 deletions examples/serialize-deserialize-12.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ async function main() {
// Create transaction id
const transactionId = new TransactionId(
operatorId,
Timestamp.fromDate(new Date())
Timestamp.fromDate(new Date()),
);

// 1. Create a transaction
const transaction = new AccountUpdateTransaction()
.setTransactionId(transactionId)
.setAccountId(operatorId)
.setAccountMemo('Hello')
.setAccountMemo("Hello");

// 2. Serialize transaction
const transactionBytes = transaction.toBytes();
Expand All @@ -64,10 +64,13 @@ async function main() {
const transactionBytesAfterBeingFrozen = transactionFromBytes.toBytes();

// 6. Deserialize transaction again
const transactionFromBytesAfterBeingFrozen = Transaction.fromBytes(transactionBytesAfterBeingFrozen);
const transactionFromBytesAfterBeingFrozen = Transaction.fromBytes(
transactionBytesAfterBeingFrozen,
);

// 7. Execute transaction
const executedTransaction = await transactionFromBytesAfterBeingFrozen.execute(client);
const executedTransaction =
await transactionFromBytesAfterBeingFrozen.execute(client);

// 8. Get a receipt
const receipt = await executedTransaction.getReceipt(client);
Expand All @@ -79,4 +82,4 @@ async function main() {
client.close();
}

void main();
void main();
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hashgraph/sdk",
"version": "2.42.0-beta.2",
"version": "2.42.0-beta.3",
"description": "Hedera™ Hashgraph SDK",
"types": "./lib/index.d.ts",
"main": "./lib/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion src/client/addressbooks/mainnet.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/client/addressbooks/testnet.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/file/FileAppendTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class FileAppendTransaction extends Transaction {
// The increment value depends on whether the node IDs list is empty or not.
// The node IDs list is not empty if the transaction has been frozen
// before serialization and deserialization, otherwise, it's empty.
const incrementValue = nodeIds.length > 0 ? nodeIds.length : 1
const incrementValue = nodeIds.length > 0 ? nodeIds.length : 1;

for (let i = 0; i < bodies.length; i += incrementValue) {
const fileAppend =
Expand Down

0 comments on commit b3ea831

Please sign in to comment.