@@ -48,6 +48,9 @@ import { HashLockTransaction } from '../../src/model/transaction/HashLockTransac
48
48
import { HashType } from '../../src/model/transaction/HashType' ;
49
49
import { LinkAction } from '../../src/model/transaction/LinkAction' ;
50
50
import { 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' ;
51
54
import { ModifyMultisigAccountTransaction } from '../../src/model/transaction/ModifyMultisigAccountTransaction' ;
52
55
import { MosaicAliasTransaction } from '../../src/model/transaction/MosaicAliasTransaction' ;
53
56
import { MosaicDefinitionTransaction } from '../../src/model/transaction/MosaicDefinitionTransaction' ;
@@ -141,11 +144,18 @@ describe('TransactionHttp', () => {
141
144
supplyMutable : true ,
142
145
transferable : true ,
143
146
divisibility : 3 ,
147
+ duration : UInt64 . fromUint ( 1000 ) ,
144
148
} ) ,
145
149
NetworkType . MIJIN_TEST ,
146
150
) ;
147
151
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 ;
149
159
done ( ) ;
150
160
} ) ;
151
161
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -214,7 +224,10 @@ describe('TransactionHttp', () => {
214
224
) ;
215
225
const signedTransaction = transferTransaction . signWith ( account , generationHash ) ;
216
226
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 ;
218
231
done ( ) ;
219
232
} ) ;
220
233
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -282,7 +295,11 @@ describe('TransactionHttp', () => {
282
295
) ;
283
296
const signedTransaction = addressModification . signWith ( account , generationHash ) ;
284
297
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 ;
286
303
done ( ) ;
287
304
} ) ;
288
305
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -353,7 +370,11 @@ describe('TransactionHttp', () => {
353
370
) ;
354
371
const signedTransaction = addressModification . signWith ( account , generationHash ) ;
355
372
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 ;
357
378
done ( ) ;
358
379
} ) ;
359
380
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -424,7 +445,11 @@ describe('TransactionHttp', () => {
424
445
) ;
425
446
const signedTransaction = addressModification . signWith ( account3 , generationHash ) ;
426
447
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 ;
428
453
done ( ) ;
429
454
} ) ;
430
455
listener . status ( account3 . address ) . subscribe ( ( error ) => {
@@ -491,7 +516,9 @@ describe('TransactionHttp', () => {
491
516
) ;
492
517
const signedTransaction = accountLinkTransaction . signWith ( account , generationHash ) ;
493
518
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 ;
495
522
done ( ) ;
496
523
} ) ;
497
524
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -554,7 +581,10 @@ describe('TransactionHttp', () => {
554
581
) ;
555
582
namespaceId = new NamespaceId ( namespaceName ) ;
556
583
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 ;
558
588
done ( ) ;
559
589
} ) ;
560
590
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -617,7 +647,10 @@ describe('TransactionHttp', () => {
617
647
) ;
618
648
const signedTransaction = addressAliasTransaction . signWith ( account , generationHash ) ;
619
649
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 ;
621
654
done ( ) ;
622
655
} ) ;
623
656
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -681,7 +714,10 @@ describe('TransactionHttp', () => {
681
714
NetworkType . MIJIN_TEST ,
682
715
) ;
683
716
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 ;
685
721
done ( ) ;
686
722
} ) ;
687
723
listener . status ( account3 . address ) . subscribe ( ( error ) => {
@@ -746,7 +782,10 @@ describe('TransactionHttp', () => {
746
782
) ;
747
783
const signedTransaction = mosaicAliasTransaction . signWith ( account , generationHash ) ;
748
784
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 ;
750
789
done ( ) ;
751
790
} ) ;
752
791
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -957,7 +996,12 @@ describe('TransactionHttp', () => {
957
996
account2 . address ,
958
997
NetworkType . MIJIN_TEST ,
959
998
) ;
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 ;
961
1005
done ( ) ;
962
1006
} ) ;
963
1007
listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -1223,7 +1267,11 @@ describe('TransactionHttp', () => {
1223
1267
NetworkType . MIJIN_TEST ,
1224
1268
) ;
1225
1269
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 ;
1227
1275
done ( ) ;
1228
1276
} ) ;
1229
1277
const secretProofTransaction = SecretProofTransaction . create (
0 commit comments