Skip to content

Commit

Permalink
fix(crypto): deserialize type > 0 with vendor field instead of skippi…
Browse files Browse the repository at this point in the history
…ng it (#2459)
  • Loading branch information
spkjp authored and faustbrian committed Apr 23, 2019
1 parent 9399a66 commit 9588dbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.3.1] - 2019-04-23

### Fixed

- Deserialize type > 0 with vendor field instead of skipping it ([#2459])

## [2.3.0] - 2019-04-23

### Breaking Changes
Expand Down Expand Up @@ -285,6 +291,7 @@ Closed security vulnerabilities:
- Initial Release

[unreleased]: https://github.com/ARKEcosystem/core/compare/2.3.0...develop
[2.3.1]: https://github.com/ARKEcosystem/core/compare/2.3.0...2.3.1
[2.3.0]: https://github.com/ARKEcosystem/core/compare/2.2.2...2.3.0
[2.2.2]: https://github.com/ARKEcosystem/core/compare/2.2.1...2.2.2
[2.2.1]: https://github.com/ARKEcosystem/core/compare/2.2.0...2.2.1
Expand Down Expand Up @@ -437,3 +444,4 @@ Closed security vulnerabilities:
[#2404]: https://github.com/ARKEcosystem/core/pull/2404
[#2405]: https://github.com/ARKEcosystem/core/pull/2405
[#2458]: https://github.com/ARKEcosystem/core/pull/2458
[#2459]: https://github.com/ARKEcosystem/core/pull/2459
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Transaction, TransactionRegistry } from "..";
import { TransactionTypes } from "../../constants";
import { crypto } from "../../crypto";
import { TransactionVersionError } from "../../errors";
import { configManager } from "../../managers";
import { Bignum } from "../../utils";
import { ITransactionData } from "../interfaces";

Expand Down Expand Up @@ -47,11 +48,6 @@ class TransactionDeserializer {
}

private deserializeVendorField(transaction: Transaction, buf: ByteBuffer): void {
if (!transaction.hasVendorField()) {
buf.skip(1);
return;
}

const vendorFieldLength = buf.readUint8();
if (vendorFieldLength > 0) {
transaction.data.vendorFieldHex = buf.readBytes(vendorFieldLength).toString("hex");
Expand Down

0 comments on commit 9588dbc

Please sign in to comment.