@@ -161,7 +161,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
161161 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
162162 : undefined ,
163163 transactionInfo ,
164- ) ;
164+ ) . setPayloadSize ( transactionDTO . size ) ;
165165 } else if ( transactionDTO . type === TransactionType . NAMESPACE_REGISTRATION ) {
166166 return new NamespaceRegistrationTransaction (
167167 transactionDTO . network ,
@@ -178,7 +178,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
178178 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
179179 : undefined ,
180180 transactionInfo ,
181- ) ;
181+ ) . setPayloadSize ( transactionDTO . size ) ;
182182 } else if ( transactionDTO . type === TransactionType . MOSAIC_DEFINITION ) {
183183 return new MosaicDefinitionTransaction (
184184 transactionDTO . network ,
@@ -195,7 +195,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
195195 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
196196 : undefined ,
197197 transactionInfo ,
198- ) ;
198+ ) . setPayloadSize ( transactionDTO . size ) ;
199199 } else if ( transactionDTO . type === TransactionType . MOSAIC_SUPPLY_CHANGE ) {
200200 return new MosaicSupplyChangeTransaction (
201201 transactionDTO . network ,
@@ -210,7 +210,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
210210 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
211211 : undefined ,
212212 transactionInfo ,
213- ) ;
213+ ) . setPayloadSize ( transactionDTO . size ) ;
214214 } else if ( transactionDTO . type === TransactionType . MULTISIG_ACCOUNT_MODIFICATION ) {
215215 return new MultisigAccountModificationTransaction (
216216 transactionDTO . network ,
@@ -226,7 +226,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
226226 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
227227 : undefined ,
228228 transactionInfo ,
229- ) ;
229+ ) . setPayloadSize ( transactionDTO . size ) ;
230230 } else if ( transactionDTO . type === TransactionType . HASH_LOCK ) {
231231 const networkType = transactionDTO . network ;
232232 return new LockFundsTransaction (
@@ -240,7 +240,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
240240 transactionDTO . signature ,
241241 transactionDTO . signerPublicKey ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , networkType ) : undefined ,
242242 transactionInfo ,
243- ) ;
243+ ) . setPayloadSize ( transactionDTO . size ) ;
244244 } else if ( transactionDTO . type === TransactionType . SECRET_LOCK ) {
245245 const recipientAddress = transactionDTO . recipientAddress ;
246246 const mosaicId = UnresolvedMapping . toUnresolvedMosaic ( transactionDTO . mosaicId ) ;
@@ -259,7 +259,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
259259 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
260260 : undefined ,
261261 transactionInfo ,
262- ) ;
262+ ) . setPayloadSize ( transactionDTO . size ) ;
263263 } else if ( transactionDTO . type === TransactionType . SECRET_PROOF ) {
264264 const recipientAddress = transactionDTO . recipientAddress ;
265265 return new SecretProofTransaction (
@@ -276,7 +276,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
276276 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
277277 : undefined ,
278278 transactionInfo ,
279- ) ;
279+ ) . setPayloadSize ( transactionDTO . size ) ;
280280 } else if ( transactionDTO . type === TransactionType . MOSAIC_ALIAS ) {
281281 return new MosaicAliasTransaction (
282282 transactionDTO . network ,
@@ -291,7 +291,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
291291 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
292292 : undefined ,
293293 transactionInfo ,
294- ) ;
294+ ) . setPayloadSize ( transactionDTO . size ) ;
295295 } else if ( transactionDTO . type === TransactionType . ADDRESS_ALIAS ) {
296296 return new AddressAliasTransaction (
297297 transactionDTO . network ,
@@ -306,7 +306,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
306306 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
307307 : undefined ,
308308 transactionInfo ,
309- ) ;
309+ ) . setPayloadSize ( transactionDTO . size ) ;
310310 } else if ( transactionDTO . type === TransactionType . ACCOUNT_ADDRESS_RESTRICTION ) {
311311 return new AccountAddressRestrictionTransaction (
312312 transactionDTO . network ,
@@ -321,7 +321,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
321321 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
322322 : undefined ,
323323 transactionInfo ,
324- ) ;
324+ ) . setPayloadSize ( transactionDTO . size ) ;
325325 } else if ( transactionDTO . type === TransactionType . ACCOUNT_OPERATION_RESTRICTION ) {
326326 return new AccountOperationRestrictionTransaction (
327327 transactionDTO . network ,
@@ -336,7 +336,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
336336 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
337337 : undefined ,
338338 transactionInfo ,
339- ) ;
339+ ) . setPayloadSize ( transactionDTO . size ) ;
340340 } else if ( transactionDTO . type === TransactionType . ACCOUNT_MOSAIC_RESTRICTION ) {
341341 return new AccountMosaicRestrictionTransaction (
342342 transactionDTO . network ,
@@ -355,7 +355,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
355355 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
356356 : undefined ,
357357 transactionInfo ,
358- ) ;
358+ ) . setPayloadSize ( transactionDTO . size ) ;
359359 } else if ( transactionDTO . type === TransactionType . ACCOUNT_KEY_LINK ) {
360360 return new AccountKeyLinkTransaction (
361361 transactionDTO . network ,
@@ -369,7 +369,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
369369 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
370370 : undefined ,
371371 transactionInfo ,
372- ) ;
372+ ) . setPayloadSize ( transactionDTO . size ) ;
373373 } else if ( transactionDTO . type === TransactionType . MOSAIC_GLOBAL_RESTRICTION ) {
374374 return new MosaicGlobalRestrictionTransaction (
375375 transactionDTO . network ,
@@ -388,7 +388,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
388388 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
389389 : undefined ,
390390 transactionInfo ,
391- ) ;
391+ ) . setPayloadSize ( transactionDTO . size ) ;
392392 } else if ( transactionDTO . type === TransactionType . MOSAIC_ADDRESS_RESTRICTION ) {
393393 return new MosaicAddressRestrictionTransaction (
394394 transactionDTO . network ,
@@ -405,7 +405,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
405405 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
406406 : undefined ,
407407 transactionInfo ,
408- ) ;
408+ ) . setPayloadSize ( transactionDTO . size ) ;
409409 } else if ( transactionDTO . type === TransactionType . ACCOUNT_METADATA ) {
410410 return new AccountMetadataTransaction (
411411 transactionDTO . network ,
@@ -421,7 +421,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
421421 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
422422 : undefined ,
423423 transactionInfo ,
424- ) ;
424+ ) . setPayloadSize ( transactionDTO . size ) ;
425425 } else if ( transactionDTO . type === TransactionType . MOSAIC_METADATA ) {
426426 return new MosaicMetadataTransaction (
427427 transactionDTO . network ,
@@ -438,7 +438,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
438438 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
439439 : undefined ,
440440 transactionInfo ,
441- ) ;
441+ ) . setPayloadSize ( transactionDTO . size ) ;
442442 } else if ( transactionDTO . type === TransactionType . NAMESPACE_METADATA ) {
443443 return new NamespaceMetadataTransaction (
444444 transactionDTO . network ,
@@ -455,7 +455,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
455455 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
456456 : undefined ,
457457 transactionInfo ,
458- ) ;
458+ ) . setPayloadSize ( transactionDTO . size ) ;
459459 } else if ( transactionDTO . type === TransactionType . VRF_KEY_LINK ) {
460460 return new VrfKeyLinkTransaction (
461461 transactionDTO . network ,
@@ -469,7 +469,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
469469 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
470470 : undefined ,
471471 transactionInfo ,
472- ) ;
472+ ) . setPayloadSize ( transactionDTO . size ) ;
473473 } else if ( transactionDTO . type === TransactionType . NODE_KEY_LINK ) {
474474 return new NodeKeyLinkTransaction (
475475 transactionDTO . network ,
@@ -483,7 +483,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
483483 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
484484 : undefined ,
485485 transactionInfo ,
486- ) ;
486+ ) . setPayloadSize ( transactionDTO . size ) ;
487487 } else if ( transactionDTO . type === TransactionType . VOTING_KEY_LINK ) {
488488 return new VotingKeyLinkTransaction (
489489 transactionDTO . network ,
@@ -499,7 +499,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
499499 ? PublicAccount . createFromPublicKey ( transactionDTO . signerPublicKey , transactionDTO . network )
500500 : undefined ,
501501 transactionInfo ,
502- ) ;
502+ ) . setPayloadSize ( transactionDTO . size ) ;
503503 }
504504 throw new Error ( 'Unimplemented transaction with type ' + transactionDTO . type ) ;
505505} ;
@@ -545,7 +545,7 @@ export const CreateTransactionFromDTO = (transactionDTO): Transaction => {
545545 ? PublicAccount . createFromPublicKey ( transactionDTO . transaction . signerPublicKey , transactionDTO . transaction . network )
546546 : undefined ,
547547 extractTransactionMeta ( transactionDTO . meta , transactionDTO . id ) ,
548- ) ;
548+ ) . setPayloadSize ( transactionDTO . transaction . size ) ;
549549 } else {
550550 return CreateStandaloneTransactionFromDTO (
551551 transactionDTO . transaction ,
0 commit comments