1616
1717import { KeyPair , MerkleHashBuilder , SHA3Hasher , SignSchema } from '../../core/crypto' ;
1818import { Convert } from '../../core/format' ;
19+ import { DtoMapping } from '../../core/utils/DtoMapping' ;
1920import { AggregateBondedTransactionBuilder } from '../../infrastructure/catbuffer/AggregateBondedTransactionBuilder' ;
2021import { AggregateCompleteTransactionBuilder } from '../../infrastructure/catbuffer/AggregateCompleteTransactionBuilder' ;
2122import { AmountDto } from '../../infrastructure/catbuffer/AmountDto' ;
@@ -193,7 +194,7 @@ export class AggregateTransaction extends Transaction {
193194 */
194195 public addTransactions ( transactions : InnerTransaction [ ] ) : AggregateTransaction {
195196 const innerTransactions = this . innerTransactions . concat ( transactions ) ;
196- return Object . assign ( { __proto__ : Object . getPrototypeOf ( this ) } , this , { innerTransactions} ) ;
197+ return DtoMapping . assign ( this , { innerTransactions} ) ;
197198 }
198199
199200 /**
@@ -204,7 +205,7 @@ export class AggregateTransaction extends Transaction {
204205 */
205206 public addCosignatures ( cosigs : AggregateTransactionCosignature [ ] ) : AggregateTransaction {
206207 const cosignatures = this . cosignatures . concat ( cosigs ) ;
207- return Object . assign ( { __proto__ : Object . getPrototypeOf ( this ) } , this , { cosignatures} ) ;
208+ return DtoMapping . assign ( this , { cosignatures} ) ;
208209 }
209210
210211 /**
@@ -407,8 +408,8 @@ export class AggregateTransaction extends Transaction {
407408 */
408409 resolveAliases ( statement : Statement ) : AggregateTransaction {
409410 const transactionInfo = this . checkTransactionHeightAndIndex ( ) ;
410- return Object . assign ( { __proto__ : Object . getPrototypeOf ( this ) } , this ,
411- { innerTransactions : this . innerTransactions . map ( ( tx ) => tx . resolveAliases ( statement , transactionInfo . index ) )
411+ return DtoMapping . assign ( this ,
412+ { innerTransactions : this . innerTransactions . map ( ( tx ) => tx . resolveAliases ( statement , transactionInfo . index ) )
412413 . sort ( ( a , b ) => a . transactionInfo ! . index - b . transactionInfo ! . index ) } ) ;
413414 }
414415}
0 commit comments