@@ -48,6 +48,9 @@ import { HashLockTransaction } from '../../src/model/transaction/HashLockTransac
4848import { HashType } from '../../src/model/transaction/HashType' ;
4949import { LinkAction } from '../../src/model/transaction/LinkAction' ;
5050import { LockFundsTransaction } from '../../src/model/transaction/LockFundsTransaction' ;
51+ import { ModifyAccountPropertyAddressTransaction } from '../../src/model/transaction/ModifyAccountPropertyAddressTransaction' ;
52+ import { ModifyAccountPropertyEntityTypeTransaction } from '../../src/model/transaction/ModifyAccountPropertyEntityTypeTransaction' ;
53+ import { ModifyAccountPropertyMosaicTransaction } from '../../src/model/transaction/ModifyAccountPropertyMosaicTransaction' ;
5154import { ModifyMultisigAccountTransaction } from '../../src/model/transaction/ModifyMultisigAccountTransaction' ;
5255import { MosaicAliasTransaction } from '../../src/model/transaction/MosaicAliasTransaction' ;
5356import { MosaicDefinitionTransaction } from '../../src/model/transaction/MosaicDefinitionTransaction' ;
@@ -141,11 +144,18 @@ describe('TransactionHttp', () => {
141144 supplyMutable : true ,
142145 transferable : true ,
143146 divisibility : 3 ,
147+ duration : UInt64 . fromUint ( 1000 ) ,
144148 } ) ,
145149 NetworkType . MIJIN_TEST ,
146150 ) ;
147151 const signedTransaction = mosaicDefinitionTransaction . signWith ( account , generationHash ) ;
148- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
152+ listener . confirmed ( account . address ) . subscribe ( ( transaction : MosaicDefinitionTransaction ) => {
153+ expect ( transaction . mosaicId , 'MosaicId' ) . not . to . be . undefined ;
154+ expect ( transaction . nonce , 'Nonce' ) . not . to . be . undefined ;
155+ expect ( transaction . mosaicProperties . divisibility , 'Divisibility' ) . not . to . be . undefined ;
156+ expect ( transaction . mosaicProperties . duration , 'Duration' ) . not . to . be . undefined ;
157+ expect ( transaction . mosaicProperties . supplyMutable , 'SupplyMutable' ) . not . to . be . undefined ;
158+ expect ( transaction . mosaicProperties . transferable , 'Transferable' ) . not . to . be . undefined ;
149159 done ( ) ;
150160 } ) ;
151161 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -214,7 +224,10 @@ describe('TransactionHttp', () => {
214224 ) ;
215225 const signedTransaction = transferTransaction . signWith ( account , generationHash ) ;
216226
217- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
227+ listener . confirmed ( account . address ) . subscribe ( ( transaction : TransferTransaction ) => {
228+ expect ( transaction . message , 'Message' ) . not . to . be . undefined ;
229+ expect ( transaction . mosaics , 'Mosaic' ) . not . to . be . undefined ;
230+ expect ( transaction . recipient , 'Recipient' ) . not . to . be . undefined ;
218231 done ( ) ;
219232 } ) ;
220233 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -282,7 +295,11 @@ describe('TransactionHttp', () => {
282295 ) ;
283296 const signedTransaction = addressModification . signWith ( account , generationHash ) ;
284297
285- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
298+ listener . confirmed ( account . address ) . subscribe ( ( transaction : ModifyAccountPropertyAddressTransaction ) => {
299+ expect ( transaction . modifications , 'Modifications' ) . not . to . be . undefined ;
300+ expect ( transaction . modifications [ 0 ] . modificationType , 'Modifications.ModificationType' ) . not . to . be . undefined ;
301+ expect ( transaction . modifications [ 0 ] . value , 'Modifications.Value' ) . not . to . be . undefined ;
302+ expect ( transaction . propertyType , 'PropertyType' ) . not . to . be . undefined ;
286303 done ( ) ;
287304 } ) ;
288305 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -353,7 +370,11 @@ describe('TransactionHttp', () => {
353370 ) ;
354371 const signedTransaction = addressModification . signWith ( account , generationHash ) ;
355372
356- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
373+ listener . confirmed ( account . address ) . subscribe ( ( transaction : ModifyAccountPropertyMosaicTransaction ) => {
374+ expect ( transaction . modifications , 'Modifications' ) . not . to . be . undefined ;
375+ expect ( transaction . modifications [ 0 ] . modificationType , 'Modifications.ModificationType' ) . not . to . be . undefined ;
376+ expect ( transaction . modifications [ 0 ] . value , 'Modifications.Value' ) . not . to . be . undefined ;
377+ expect ( transaction . propertyType , 'PropertyType' ) . not . to . be . undefined ;
357378 done ( ) ;
358379 } ) ;
359380 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -424,7 +445,11 @@ describe('TransactionHttp', () => {
424445 ) ;
425446 const signedTransaction = addressModification . signWith ( account3 , generationHash ) ;
426447
427- listener . confirmed ( account3 . address ) . subscribe ( ( transaction : Transaction ) => {
448+ listener . confirmed ( account3 . address ) . subscribe ( ( transaction : ModifyAccountPropertyEntityTypeTransaction ) => {
449+ expect ( transaction . modifications , 'Modifications' ) . not . to . be . undefined ;
450+ expect ( transaction . modifications [ 0 ] . modificationType , 'Modifications.ModificationType' ) . not . to . be . undefined ;
451+ expect ( transaction . modifications [ 0 ] . value , 'Modifications.Value' ) . not . to . be . undefined ;
452+ expect ( transaction . propertyType , 'PropertyType' ) . not . to . be . undefined ;
428453 done ( ) ;
429454 } ) ;
430455 listener . status ( account3 . address ) . subscribe ( ( error ) => {
@@ -491,7 +516,9 @@ describe('TransactionHttp', () => {
491516 ) ;
492517 const signedTransaction = accountLinkTransaction . signWith ( account , generationHash ) ;
493518
494- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
519+ listener . confirmed ( account . address ) . subscribe ( ( transaction : AccountLinkTransaction ) => {
520+ expect ( transaction . remoteAccountKey , 'RemoteAccountKey' ) . not . to . be . undefined ;
521+ expect ( transaction . linkAction , 'LinkAction' ) . not . to . be . undefined ;
495522 done ( ) ;
496523 } ) ;
497524 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -554,7 +581,10 @@ describe('TransactionHttp', () => {
554581 ) ;
555582 namespaceId = new NamespaceId ( namespaceName ) ;
556583 const signedTransaction = registerNamespaceTransaction . signWith ( account , generationHash ) ;
557- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
584+ listener . confirmed ( account . address ) . subscribe ( ( transaction : RegisterNamespaceTransaction ) => {
585+ expect ( transaction . namespaceId , 'NamespaceId' ) . not . to . be . undefined ;
586+ expect ( transaction . namespaceName , 'NamespaceName' ) . not . to . be . undefined ;
587+ expect ( transaction . namespaceType , 'NamespaceType' ) . not . to . be . undefined ;
558588 done ( ) ;
559589 } ) ;
560590 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -617,7 +647,10 @@ describe('TransactionHttp', () => {
617647 ) ;
618648 const signedTransaction = addressAliasTransaction . signWith ( account , generationHash ) ;
619649
620- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
650+ listener . confirmed ( account . address ) . subscribe ( ( transaction : AddressAliasTransaction ) => {
651+ expect ( transaction . namespaceId , 'NamespaceId' ) . not . to . be . undefined ;
652+ expect ( transaction . actionType , 'ActionType' ) . not . to . be . undefined ;
653+ expect ( transaction . address , 'Address' ) . not . to . be . undefined ;
621654 done ( ) ;
622655 } ) ;
623656 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -681,7 +714,10 @@ describe('TransactionHttp', () => {
681714 NetworkType . MIJIN_TEST ,
682715 ) ;
683716 const signedTransaction = mosaicSupplyChangeTransaction . signWith ( account , generationHash ) ;
684- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
717+ listener . confirmed ( account . address ) . subscribe ( ( transaction : MosaicSupplyChangeTransaction ) => {
718+ expect ( transaction . delta , 'Delta' ) . not . to . be . undefined ;
719+ expect ( transaction . direction , 'Direction' ) . not . to . be . undefined ;
720+ expect ( transaction . mosaicId , 'MosaicId' ) . not . to . be . undefined ;
685721 done ( ) ;
686722 } ) ;
687723 listener . status ( account3 . address ) . subscribe ( ( error ) => {
@@ -746,7 +782,10 @@ describe('TransactionHttp', () => {
746782 ) ;
747783 const signedTransaction = mosaicAliasTransaction . signWith ( account , generationHash ) ;
748784
749- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
785+ listener . confirmed ( account . address ) . subscribe ( ( transaction : MosaicAliasTransaction ) => {
786+ expect ( transaction . namespaceId , 'NamespaceId' ) . not . to . be . undefined ;
787+ expect ( transaction . actionType , 'ActionType' ) . not . to . be . undefined ;
788+ expect ( transaction . mosaicId , 'MosaicId' ) . not . to . be . undefined ;
750789 done ( ) ;
751790 } ) ;
752791 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -957,7 +996,12 @@ describe('TransactionHttp', () => {
957996 account2 . address ,
958997 NetworkType . MIJIN_TEST ,
959998 ) ;
960- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
999+ listener . confirmed ( account . address ) . subscribe ( ( transaction : SecretLockTransaction ) => {
1000+ expect ( transaction . mosaic , 'Mosaic' ) . not . to . be . undefined ;
1001+ expect ( transaction . duration , 'Duration' ) . not . to . be . undefined ;
1002+ expect ( transaction . hashType , 'HashType' ) . not . to . be . undefined ;
1003+ expect ( transaction . secret , 'Secret' ) . not . to . be . undefined ;
1004+ expect ( transaction . recipient , 'Recipient' ) . not . to . be . undefined ;
9611005 done ( ) ;
9621006 } ) ;
9631007 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -1223,7 +1267,11 @@ describe('TransactionHttp', () => {
12231267 NetworkType . MIJIN_TEST ,
12241268 ) ;
12251269 listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
1226- listener . confirmed ( account2 . address ) . subscribe ( ( transaction : Transaction ) => {
1270+ listener . confirmed ( account2 . address ) . subscribe ( ( transaction : SecretProofTransaction ) => {
1271+ expect ( transaction . secret , 'Secret' ) . not . to . be . undefined ;
1272+ expect ( transaction . recipient , 'Recipient' ) . not . to . be . undefined ;
1273+ expect ( transaction . hashType , 'HashType' ) . not . to . be . undefined ;
1274+ expect ( transaction . proof , 'Proof' ) . not . to . be . undefined ;
12271275 done ( ) ;
12281276 } ) ;
12291277 const secretProofTransaction = SecretProofTransaction . create (
0 commit comments