Skip to content

Commit

Permalink
refactor: implement better transaction conversion
Browse files Browse the repository at this point in the history
Signed-off-by: Ivaylo Nikolov <[email protected]>
  • Loading branch information
ivaylonikolov7 committed Sep 19, 2024
1 parent 00cdc2d commit efdc396
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/file/FileAppendTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,17 @@ export default class FileAppendTransaction extends Transaction {
throw new Error("fileID is required");
}

return new FileAppendTransaction({
fileId: fileId,
contents: contents,
});
return Transaction._fromProtobufTransactions(
new FileAppendTransaction({
fileId: fileId,
contents: contents,
}),
[],
signedTransactions,
transactionIds,
nodeIds,
bodies,
);
}

Check warning on line 672 in src/file/FileAppendTransaction.js

View check run for this annotation

Codecov / codecov/patch

src/file/FileAppendTransaction.js#L505-L672

Added lines #L505 - L672 were not covered by tests

/**
Expand Down

0 comments on commit efdc396

Please sign in to comment.