Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.

The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.11.4] - 17-Apr-2019

- Fixed #117, Typo in AddressAliasTransaction and MosaicAliasTransaction comments
- Fixed several typos in documentation
- Fixed CreateTransactionFromDTO to allow `message` to be undefined
- Added transaction/EncryptedMessage
- Added QueryParams.order order parameter

## [0.11.3] - 10-Apr-2019

- Added `Transaction.maxFee` optional property in `create()` methods. (fixes #53)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ with the NEM2 (a.k.a Catapult)

Due to a network upgrade with [catapult-server@cow](https://github.com/nemtech/catapult-server/releases/tag/v0.3.0.2) version, **transactions from Alpaca&Bison are not compatible anymore**.

The upgrade to this SDK's [version v0.11](https://github.com/nemtech/nem2-sdk-typescript-javascript/releases/tag/v0.11) is mandatory for **cow compatibility**.
The upgrade to this SDK's [version v0.11.4](https://github.com/nemtech/nem2-sdk-typescript-javascript/releases/tag/v0.11.4) is mandatory for **cow compatibility**.

Other versions like [version v0.10.1-beta](https://github.com/nemtech/nem2-sdk-typescript-javascript/releases/tag/v0.10.1-beta) can be used for **bison** network version.

Expand Down Expand Up @@ -55,6 +55,7 @@ Please, use the following available resources to get help:

Important versions listed below. Refer to the [Changelog](CHANGELOG.md) for a full history of the project.

- [0.11.4](CHANGELOG.md#0114-17-Apr-2019) - **Cow compatible** - 17.04.2019
- [0.11.3](CHANGELOG.md#0113-10-Apr-2019) - **Cow compatible** - 10.04.2019
- [0.11.2](CHANGELOG.md#0112-1-Apr-2019) - **Cow compatible** - 01.04.2019
- [0.11](CHANGELOG.md#011-14-Mar-2019) - **Cow compatible** - 14.03.2019
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nem2-sdk",
"version": "0.11.3",
"version": "0.11.4",
"description": "Reactive Nem2 sdk for typescript and javascript",
"scripts": {
"pretest": "npm run build",
Expand Down
29 changes: 15 additions & 14 deletions src/infrastructure/transaction/CreateTransactionFromDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ export const CreateTransactionFromDTO = (transactionDTO): Transaction => {
* @constructor
*/
const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Transaction => {

if (transactionDTO.type === TransactionType.TRANSFER) {
return new TransferTransaction(
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
extractRecipient(transactionDTO.recipient),
extractMosaics(transactionDTO.mosaics),
extractMessage(transactionDTO.message !== undefined ? transactionDTO.message.payload : undefined),
Expand All @@ -136,7 +137,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.namespaceType,
transactionDTO.name,
new NamespaceId(transactionDTO.namespaceId),
Expand All @@ -152,7 +153,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.nonce,
new MosaicId(transactionDTO.mosaicId),
new MosaicProperties(
Expand All @@ -171,7 +172,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee),
new MosaicId(transactionDTO.mosaicId),
transactionDTO.direction,
new UInt64(transactionDTO.delta),
Expand All @@ -185,7 +186,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.minApprovalDelta,
transactionDTO.minRemovalDelta,
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new MultisigCosignatoryModification(
Expand All @@ -203,7 +204,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
networkType,
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee),
new Mosaic(new MosaicId(transactionDTO.mosaicId), new UInt64(transactionDTO.amount)),
new UInt64(transactionDTO.duration),
new SignedTransaction('', transactionDTO.hash, '', TransactionType.AGGREGATE_BONDED, networkType),
Expand All @@ -217,7 +218,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
new Mosaic(new MosaicId(transactionDTO.mosaicId), new UInt64(transactionDTO.amount)),
new UInt64(transactionDTO.duration),
transactionDTO.hashAlgorithm,
Expand All @@ -234,7 +235,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee),
transactionDTO.hashAlgorithm,
transactionDTO.secret,
transactionDTO.proof,
Expand All @@ -248,7 +249,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.aliasAction,
new NamespaceId(transactionDTO.namespaceId),
new MosaicId(transactionDTO.mosaicId),
Expand All @@ -262,7 +263,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.aliasAction,
new NamespaceId(transactionDTO.namespaceId),
extractRecipient(transactionDTO.address) as Address,
Expand All @@ -276,7 +277,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.propertyType,
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new AccountPropertyModification(
modificationDTO.modificationType,
Expand All @@ -292,7 +293,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.propertyType,
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new AccountPropertyModification(
modificationDTO.modificationType,
Expand All @@ -308,7 +309,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.propertyType,
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new AccountPropertyModification(
modificationDTO.modificationType,
Expand All @@ -324,7 +325,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
extractNetworkType(transactionDTO.version),
extractTransactionVersion(transactionDTO.version),
Deadline.createFromDTO(transactionDTO.deadline),
UInt64.fromUint(transactionDTO.maxFee || 0),
new UInt64(transactionDTO.maxFee || [0, 0]),
transactionDTO.remoteAccountKey,
transactionDTO.linkAction,
transactionDTO.signature,
Expand Down