Skip to content

Commit 50bcd54

Browse files
author
Grégory Saive
authored
Merge pull request #124 from evias/master
Fixed transaction.maxFee DTO reads ; updated CHANGELOG and README
2 parents dd2df44 + 13e4af9 commit 50bcd54

File tree

5 files changed

+27
-17
lines changed

5 files changed

+27
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
33

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

6+
## [0.11.4] - 17-Apr-2019
7+
8+
- Fixed #117, Typo in AddressAliasTransaction and MosaicAliasTransaction comments
9+
- Fixed several typos in documentation
10+
- Fixed CreateTransactionFromDTO to allow `message` to be undefined
11+
- Added transaction/EncryptedMessage
12+
- Added QueryParams.order order parameter
13+
614
## [0.11.3] - 10-Apr-2019
715

816
- Added `Transaction.maxFee` optional property in `create()` methods. (fixes #53)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ with the NEM2 (a.k.a Catapult)
1212

1313
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**.
1414

15-
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**.
15+
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**.
1616

1717
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.
1818

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

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

58+
- [0.11.4](CHANGELOG.md#0114-17-Apr-2019) - **Cow compatible** - 17.04.2019
5859
- [0.11.3](CHANGELOG.md#0113-10-Apr-2019) - **Cow compatible** - 10.04.2019
5960
- [0.11.2](CHANGELOG.md#0112-1-Apr-2019) - **Cow compatible** - 01.04.2019
6061
- [0.11](CHANGELOG.md#011-14-Mar-2019) - **Cow compatible** - 14.03.2019

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nem2-sdk",
3-
"version": "0.11.3",
3+
"version": "0.11.4",
44
"description": "Reactive Nem2 sdk for typescript and javascript",
55
"scripts": {
66
"pretest": "npm run build",

src/infrastructure/transaction/CreateTransactionFromDTO.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ export const CreateTransactionFromDTO = (transactionDTO): Transaction => {
117117
* @constructor
118118
*/
119119
const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Transaction => {
120+
120121
if (transactionDTO.type === TransactionType.TRANSFER) {
121122
return new TransferTransaction(
122123
extractNetworkType(transactionDTO.version),
123124
extractTransactionVersion(transactionDTO.version),
124125
Deadline.createFromDTO(transactionDTO.deadline),
125-
UInt64.fromUint(transactionDTO.maxFee || 0),
126+
new UInt64(transactionDTO.maxFee || [0, 0]),
126127
extractRecipient(transactionDTO.recipient),
127128
extractMosaics(transactionDTO.mosaics),
128129
extractMessage(transactionDTO.message !== undefined ? transactionDTO.message.payload : undefined),
@@ -136,7 +137,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
136137
extractNetworkType(transactionDTO.version),
137138
extractTransactionVersion(transactionDTO.version),
138139
Deadline.createFromDTO(transactionDTO.deadline),
139-
UInt64.fromUint(transactionDTO.maxFee || 0),
140+
new UInt64(transactionDTO.maxFee || [0, 0]),
140141
transactionDTO.namespaceType,
141142
transactionDTO.name,
142143
new NamespaceId(transactionDTO.namespaceId),
@@ -152,7 +153,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
152153
extractNetworkType(transactionDTO.version),
153154
extractTransactionVersion(transactionDTO.version),
154155
Deadline.createFromDTO(transactionDTO.deadline),
155-
UInt64.fromUint(transactionDTO.maxFee || 0),
156+
new UInt64(transactionDTO.maxFee || [0, 0]),
156157
transactionDTO.nonce,
157158
new MosaicId(transactionDTO.mosaicId),
158159
new MosaicProperties(
@@ -171,7 +172,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
171172
extractNetworkType(transactionDTO.version),
172173
extractTransactionVersion(transactionDTO.version),
173174
Deadline.createFromDTO(transactionDTO.deadline),
174-
UInt64.fromUint(transactionDTO.maxFee || 0),
175+
new UInt64(transactionDTO.maxFee),
175176
new MosaicId(transactionDTO.mosaicId),
176177
transactionDTO.direction,
177178
new UInt64(transactionDTO.delta),
@@ -185,7 +186,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
185186
extractNetworkType(transactionDTO.version),
186187
extractTransactionVersion(transactionDTO.version),
187188
Deadline.createFromDTO(transactionDTO.deadline),
188-
UInt64.fromUint(transactionDTO.maxFee || 0),
189+
new UInt64(transactionDTO.maxFee || [0, 0]),
189190
transactionDTO.minApprovalDelta,
190191
transactionDTO.minRemovalDelta,
191192
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new MultisigCosignatoryModification(
@@ -203,7 +204,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
203204
networkType,
204205
extractTransactionVersion(transactionDTO.version),
205206
Deadline.createFromDTO(transactionDTO.deadline),
206-
UInt64.fromUint(transactionDTO.maxFee || 0),
207+
new UInt64(transactionDTO.maxFee),
207208
new Mosaic(new MosaicId(transactionDTO.mosaicId), new UInt64(transactionDTO.amount)),
208209
new UInt64(transactionDTO.duration),
209210
new SignedTransaction('', transactionDTO.hash, '', TransactionType.AGGREGATE_BONDED, networkType),
@@ -217,7 +218,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
217218
extractNetworkType(transactionDTO.version),
218219
extractTransactionVersion(transactionDTO.version),
219220
Deadline.createFromDTO(transactionDTO.deadline),
220-
UInt64.fromUint(transactionDTO.maxFee || 0),
221+
new UInt64(transactionDTO.maxFee || [0, 0]),
221222
new Mosaic(new MosaicId(transactionDTO.mosaicId), new UInt64(transactionDTO.amount)),
222223
new UInt64(transactionDTO.duration),
223224
transactionDTO.hashAlgorithm,
@@ -234,7 +235,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
234235
extractNetworkType(transactionDTO.version),
235236
extractTransactionVersion(transactionDTO.version),
236237
Deadline.createFromDTO(transactionDTO.deadline),
237-
UInt64.fromUint(transactionDTO.maxFee || 0),
238+
new UInt64(transactionDTO.maxFee),
238239
transactionDTO.hashAlgorithm,
239240
transactionDTO.secret,
240241
transactionDTO.proof,
@@ -248,7 +249,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
248249
extractNetworkType(transactionDTO.version),
249250
extractTransactionVersion(transactionDTO.version),
250251
Deadline.createFromDTO(transactionDTO.deadline),
251-
UInt64.fromUint(transactionDTO.maxFee || 0),
252+
new UInt64(transactionDTO.maxFee || [0, 0]),
252253
transactionDTO.aliasAction,
253254
new NamespaceId(transactionDTO.namespaceId),
254255
new MosaicId(transactionDTO.mosaicId),
@@ -262,7 +263,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
262263
extractNetworkType(transactionDTO.version),
263264
extractTransactionVersion(transactionDTO.version),
264265
Deadline.createFromDTO(transactionDTO.deadline),
265-
UInt64.fromUint(transactionDTO.maxFee || 0),
266+
new UInt64(transactionDTO.maxFee || [0, 0]),
266267
transactionDTO.aliasAction,
267268
new NamespaceId(transactionDTO.namespaceId),
268269
extractRecipient(transactionDTO.address) as Address,
@@ -276,7 +277,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
276277
extractNetworkType(transactionDTO.version),
277278
extractTransactionVersion(transactionDTO.version),
278279
Deadline.createFromDTO(transactionDTO.deadline),
279-
UInt64.fromUint(transactionDTO.maxFee || 0),
280+
new UInt64(transactionDTO.maxFee || [0, 0]),
280281
transactionDTO.propertyType,
281282
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new AccountPropertyModification(
282283
modificationDTO.modificationType,
@@ -292,7 +293,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
292293
extractNetworkType(transactionDTO.version),
293294
extractTransactionVersion(transactionDTO.version),
294295
Deadline.createFromDTO(transactionDTO.deadline),
295-
UInt64.fromUint(transactionDTO.maxFee || 0),
296+
new UInt64(transactionDTO.maxFee || [0, 0]),
296297
transactionDTO.propertyType,
297298
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new AccountPropertyModification(
298299
modificationDTO.modificationType,
@@ -308,7 +309,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
308309
extractNetworkType(transactionDTO.version),
309310
extractTransactionVersion(transactionDTO.version),
310311
Deadline.createFromDTO(transactionDTO.deadline),
311-
UInt64.fromUint(transactionDTO.maxFee || 0),
312+
new UInt64(transactionDTO.maxFee || [0, 0]),
312313
transactionDTO.propertyType,
313314
transactionDTO.modifications ? transactionDTO.modifications.map((modificationDTO) => new AccountPropertyModification(
314315
modificationDTO.modificationType,
@@ -324,7 +325,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
324325
extractNetworkType(transactionDTO.version),
325326
extractTransactionVersion(transactionDTO.version),
326327
Deadline.createFromDTO(transactionDTO.deadline),
327-
UInt64.fromUint(transactionDTO.maxFee || 0),
328+
new UInt64(transactionDTO.maxFee || [0, 0]),
328329
transactionDTO.remoteAccountKey,
329330
transactionDTO.linkAction,
330331
transactionDTO.signature,

0 commit comments

Comments
 (0)