@@ -161,7 +161,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
161
161
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
162
162
: undefined ,
163
163
transactionInfo ,
164
- ) ;
164
+ ) . setPayloadSize ( transactionDTO . size ) ;
165
165
} else if ( transactionDTO . type === TransactionType . NAMESPACE_REGISTRATION ) {
166
166
return new NamespaceRegistrationTransaction (
167
167
transactionDTO . network ,
@@ -178,7 +178,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
178
178
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
179
179
: undefined ,
180
180
transactionInfo ,
181
- ) ;
181
+ ) . setPayloadSize ( transactionDTO . size ) ;
182
182
} else if ( transactionDTO . type === TransactionType . MOSAIC_DEFINITION ) {
183
183
return new MosaicDefinitionTransaction (
184
184
transactionDTO . network ,
@@ -195,7 +195,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
195
195
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
196
196
: undefined ,
197
197
transactionInfo ,
198
- ) ;
198
+ ) . setPayloadSize ( transactionDTO . size ) ;
199
199
} else if ( transactionDTO . type === TransactionType . MOSAIC_SUPPLY_CHANGE ) {
200
200
return new MosaicSupplyChangeTransaction (
201
201
transactionDTO . network ,
@@ -210,7 +210,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
210
210
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
211
211
: undefined ,
212
212
transactionInfo ,
213
- ) ;
213
+ ) . setPayloadSize ( transactionDTO . size ) ;
214
214
} else if ( transactionDTO . type === TransactionType . MULTISIG_ACCOUNT_MODIFICATION ) {
215
215
return new MultisigAccountModificationTransaction (
216
216
transactionDTO . network ,
@@ -226,7 +226,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
226
226
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
227
227
: undefined ,
228
228
transactionInfo ,
229
- ) ;
229
+ ) . setPayloadSize ( transactionDTO . size ) ;
230
230
} else if ( transactionDTO . type === TransactionType . HASH_LOCK ) {
231
231
const networkType = transactionDTO . network ;
232
232
return new LockFundsTransaction (
@@ -240,7 +240,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
240
240
transactionDTO . signature ,
241
241
transactionDTO . signerPublicKey ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , networkType ) : undefined ,
242
242
transactionInfo ,
243
- ) ;
243
+ ) . setPayloadSize ( transactionDTO . size ) ;
244
244
} else if ( transactionDTO . type === TransactionType . SECRET_LOCK ) {
245
245
const recipientAddress = transactionDTO . recipientAddress ;
246
246
const mosaicId = UnresolvedMapping . toUnresolvedMosaic ( transactionDTO . mosaicId ) ;
@@ -259,7 +259,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
259
259
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
260
260
: undefined ,
261
261
transactionInfo ,
262
- ) ;
262
+ ) . setPayloadSize ( transactionDTO . size ) ;
263
263
} else if ( transactionDTO . type === TransactionType . SECRET_PROOF ) {
264
264
const recipientAddress = transactionDTO . recipientAddress ;
265
265
return new SecretProofTransaction (
@@ -276,7 +276,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
276
276
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
277
277
: undefined ,
278
278
transactionInfo ,
279
- ) ;
279
+ ) . setPayloadSize ( transactionDTO . size ) ;
280
280
} else if ( transactionDTO . type === TransactionType . MOSAIC_ALIAS ) {
281
281
return new MosaicAliasTransaction (
282
282
transactionDTO . network ,
@@ -291,7 +291,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
291
291
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
292
292
: undefined ,
293
293
transactionInfo ,
294
- ) ;
294
+ ) . setPayloadSize ( transactionDTO . size ) ;
295
295
} else if ( transactionDTO . type === TransactionType . ADDRESS_ALIAS ) {
296
296
return new AddressAliasTransaction (
297
297
transactionDTO . network ,
@@ -306,7 +306,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
306
306
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
307
307
: undefined ,
308
308
transactionInfo ,
309
- ) ;
309
+ ) . setPayloadSize ( transactionDTO . size ) ;
310
310
} else if ( transactionDTO . type === TransactionType . ACCOUNT_ADDRESS_RESTRICTION ) {
311
311
return new AccountAddressRestrictionTransaction (
312
312
transactionDTO . network ,
@@ -321,7 +321,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
321
321
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
322
322
: undefined ,
323
323
transactionInfo ,
324
- ) ;
324
+ ) . setPayloadSize ( transactionDTO . size ) ;
325
325
} else if ( transactionDTO . type === TransactionType . ACCOUNT_OPERATION_RESTRICTION ) {
326
326
return new AccountOperationRestrictionTransaction (
327
327
transactionDTO . network ,
@@ -336,7 +336,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
336
336
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
337
337
: undefined ,
338
338
transactionInfo ,
339
- ) ;
339
+ ) . setPayloadSize ( transactionDTO . size ) ;
340
340
} else if ( transactionDTO . type === TransactionType . ACCOUNT_MOSAIC_RESTRICTION ) {
341
341
return new AccountMosaicRestrictionTransaction (
342
342
transactionDTO . network ,
@@ -355,7 +355,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
355
355
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
356
356
: undefined ,
357
357
transactionInfo ,
358
- ) ;
358
+ ) . setPayloadSize ( transactionDTO . size ) ;
359
359
} else if ( transactionDTO . type === TransactionType . ACCOUNT_KEY_LINK ) {
360
360
return new AccountKeyLinkTransaction (
361
361
transactionDTO . network ,
@@ -369,7 +369,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
369
369
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
370
370
: undefined ,
371
371
transactionInfo ,
372
- ) ;
372
+ ) . setPayloadSize ( transactionDTO . size ) ;
373
373
} else if ( transactionDTO . type === TransactionType . MOSAIC_GLOBAL_RESTRICTION ) {
374
374
return new MosaicGlobalRestrictionTransaction (
375
375
transactionDTO . network ,
@@ -388,7 +388,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
388
388
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
389
389
: undefined ,
390
390
transactionInfo ,
391
- ) ;
391
+ ) . setPayloadSize ( transactionDTO . size ) ;
392
392
} else if ( transactionDTO . type === TransactionType . MOSAIC_ADDRESS_RESTRICTION ) {
393
393
return new MosaicAddressRestrictionTransaction (
394
394
transactionDTO . network ,
@@ -405,7 +405,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
405
405
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
406
406
: undefined ,
407
407
transactionInfo ,
408
- ) ;
408
+ ) . setPayloadSize ( transactionDTO . size ) ;
409
409
} else if ( transactionDTO . type === TransactionType . ACCOUNT_METADATA ) {
410
410
return new AccountMetadataTransaction (
411
411
transactionDTO . network ,
@@ -421,7 +421,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
421
421
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
422
422
: undefined ,
423
423
transactionInfo ,
424
- ) ;
424
+ ) . setPayloadSize ( transactionDTO . size ) ;
425
425
} else if ( transactionDTO . type === TransactionType . MOSAIC_METADATA ) {
426
426
return new MosaicMetadataTransaction (
427
427
transactionDTO . network ,
@@ -438,7 +438,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
438
438
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
439
439
: undefined ,
440
440
transactionInfo ,
441
- ) ;
441
+ ) . setPayloadSize ( transactionDTO . size ) ;
442
442
} else if ( transactionDTO . type === TransactionType . NAMESPACE_METADATA ) {
443
443
return new NamespaceMetadataTransaction (
444
444
transactionDTO . network ,
@@ -455,7 +455,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
455
455
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
456
456
: undefined ,
457
457
transactionInfo ,
458
- ) ;
458
+ ) . setPayloadSize ( transactionDTO . size ) ;
459
459
} else if ( transactionDTO . type === TransactionType . VRF_KEY_LINK ) {
460
460
return new VrfKeyLinkTransaction (
461
461
transactionDTO . network ,
@@ -469,7 +469,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
469
469
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
470
470
: undefined ,
471
471
transactionInfo ,
472
- ) ;
472
+ ) . setPayloadSize ( transactionDTO . size ) ;
473
473
} else if ( transactionDTO . type === TransactionType . NODE_KEY_LINK ) {
474
474
return new NodeKeyLinkTransaction (
475
475
transactionDTO . network ,
@@ -483,7 +483,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
483
483
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
484
484
: undefined ,
485
485
transactionInfo ,
486
- ) ;
486
+ ) . setPayloadSize ( transactionDTO . size ) ;
487
487
} else if ( transactionDTO . type === TransactionType . VOTING_KEY_LINK ) {
488
488
return new VotingKeyLinkTransaction (
489
489
transactionDTO . network ,
@@ -499,7 +499,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
499
499
? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
500
500
: undefined ,
501
501
transactionInfo ,
502
- ) ;
502
+ ) . setPayloadSize ( transactionDTO . size ) ;
503
503
}
504
504
throw new Error ( 'Unimplemented transaction with type ' + transactionDTO . type ) ;
505
505
} ;
@@ -545,7 +545,7 @@ export const CreateTransactionFromDTO = (transactionDTO): Transaction => {
545
545
? PublicAccount . createFromPublicKey ( transactionDTO . transaction . signerPublicKey , transactionDTO . transaction . network )
546
546
: undefined ,
547
547
extractTransactionMeta ( transactionDTO . meta , transactionDTO . id ) ,
548
- ) ;
548
+ ) . setPayloadSize ( transactionDTO . transaction . size ) ;
549
549
} else {
550
550
return CreateStandaloneTransactionFromDTO (
551
551
transactionDTO . transaction ,
0 commit comments