@@ -774,7 +774,7 @@ describe('TransactionHttp', () => {
774774 NetworkType . MIJIN_TEST ,
775775 [ ] ,
776776 ) ;
777- const signedTransaction = account . sign ( aggregateTransaction ) ;
777+ const signedTransaction = account . sign ( aggregateTransaction , generationHash ) ;
778778 const hashLockTransaction = HashLockTransaction . create ( Deadline . create ( ) ,
779779 new Mosaic ( new NamespaceId ( 'cat.currency' ) , UInt64 . fromUint ( 10 * Math . pow ( 10 , NetworkCurrencyMosaic . DIVISIBILITY ) ) ) ,
780780 UInt64 . fromUint ( 10000 ) ,
@@ -789,7 +789,7 @@ describe('TransactionHttp', () => {
789789 assert ( false ) ;
790790 done ( ) ;
791791 } ) ;
792- transactionHttp . announce ( hashLockTransaction . signWith ( account ) ) ;
792+ transactionHttp . announce ( hashLockTransaction . signWith ( account , generationHash ) ) ;
793793 } ) ;
794794 } ) ;
795795
@@ -910,8 +910,6 @@ describe('TransactionHttp', () => {
910910 return listener . close ( ) ;
911911 } ) ;
912912 it ( 'should announce aggregated complete transaction' , ( done ) => {
913- const signerAccount = account ;
914-
915913 const tx = TransferTransaction . create (
916914 Deadline . create ( ) ,
917915 account2 . address ,
@@ -922,12 +920,12 @@ describe('TransactionHttp', () => {
922920 const aggTx = AggregateTransaction . createComplete (
923921 Deadline . create ( ) ,
924922 [
925- tx . toAggregate ( signerAccount . publicAccount ) ,
923+ tx . toAggregate ( account . publicAccount ) ,
926924 ] ,
927925 NetworkType . MIJIN_TEST ,
928926 [ ] ,
929927 ) ;
930- const signedTx = signerAccount . sign ( aggTx , generationHash ) ;
928+ const signedTx = account . sign ( aggTx , generationHash ) ;
931929 listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
932930 done ( ) ;
933931 } ) ;
@@ -1225,6 +1223,9 @@ describe('TransactionHttp', () => {
12251223 NetworkType . MIJIN_TEST ,
12261224 ) ;
12271225 listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
1226+ listener . confirmed ( account2 . address ) . subscribe ( ( transaction : Transaction ) => {
1227+ done ( ) ;
1228+ } ) ;
12281229 const secretProofTransaction = SecretProofTransaction . create (
12291230 Deadline . create ( ) ,
12301231 HashType . Op_Sha3_256 ,
@@ -1236,9 +1237,6 @@ describe('TransactionHttp', () => {
12361237 const signedTx = secretProofTransaction . signWith ( account2 , generationHash ) ;
12371238 transactionHttp . announce ( signedTx ) ;
12381239 } ) ;
1239- listener . confirmed ( account2 . address ) . subscribe ( ( transaction : Transaction ) => {
1240- done ( ) ;
1241- } ) ;
12421240 listener . status ( account2 . address ) . subscribe ( ( error ) => {
12431241 console . log ( 'Error:' , error ) ;
12441242 assert ( false ) ;
@@ -1286,7 +1284,7 @@ describe('TransactionHttp', () => {
12861284 [ secretProofTransaction . toAggregate ( account2 . publicAccount ) ] ,
12871285 NetworkType . MIJIN_TEST ,
12881286 [ ] ) ;
1289- transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
1287+ transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
12901288 } ) ;
12911289 listener . status ( account . address ) . subscribe ( ( error ) => {
12921290 console . log ( 'Error:' , error ) ;
@@ -1378,7 +1376,7 @@ describe('TransactionHttp', () => {
13781376 [ secretProofTransaction . toAggregate ( account2 . publicAccount ) ] ,
13791377 NetworkType . MIJIN_TEST ,
13801378 [ ] ) ;
1381- transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
1379+ transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
13821380 } ) ;
13831381 listener . status ( account . address ) . subscribe ( ( error ) => {
13841382 console . log ( 'Error:' , error ) ;
@@ -1413,6 +1411,14 @@ describe('TransactionHttp', () => {
14131411 NetworkType . MIJIN_TEST ,
14141412 ) ;
14151413 listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
1414+ listener . confirmed ( account2 . address ) . subscribe ( ( transaction : Transaction ) => {
1415+ done ( ) ;
1416+ } ) ;
1417+ listener . status ( account2 . address ) . subscribe ( ( error ) => {
1418+ console . log ( 'Error:' , error ) ;
1419+ assert ( false ) ;
1420+ done ( ) ;
1421+ } ) ;
14161422 const secretProofTransaction = SecretProofTransaction . create (
14171423 Deadline . create ( ) ,
14181424 HashType . Op_Hash_160 ,
@@ -1424,14 +1430,6 @@ describe('TransactionHttp', () => {
14241430 const signedTx = secretProofTransaction . signWith ( account2 , generationHash ) ;
14251431 transactionHttp . announce ( signedTx ) ;
14261432 } ) ;
1427- listener . confirmed ( account2 . address ) . subscribe ( ( transaction : Transaction ) => {
1428- done ( ) ;
1429- } ) ;
1430- listener . status ( account2 . address ) . subscribe ( ( error ) => {
1431- console . log ( 'Error:' , error ) ;
1432- assert ( false ) ;
1433- done ( ) ;
1434- } ) ;
14351433 listener . status ( account . address ) . subscribe ( ( error ) => {
14361434 console . log ( 'Error:' , error ) ;
14371435 assert ( false ) ;
@@ -1485,7 +1483,7 @@ describe('TransactionHttp', () => {
14851483 [ secretProofTransaction . toAggregate ( account2 . publicAccount ) ] ,
14861484 NetworkType . MIJIN_TEST ,
14871485 [ ] ) ;
1488- transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
1486+ transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
14891487 } ) ;
14901488 listener . status ( account . address ) . subscribe ( ( error ) => {
14911489 console . log ( 'Error:' , error ) ;
@@ -1591,7 +1589,7 @@ describe('TransactionHttp', () => {
15911589 [ secretProofTransaction . toAggregate ( account2 . publicAccount ) ] ,
15921590 NetworkType . MIJIN_TEST ,
15931591 [ ] ) ;
1594- transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
1592+ transactionHttp . announce ( aggregateSecretProofTransaction . signWith ( account2 , generationHash ) ) ;
15951593 } ) ;
15961594 listener . status ( account . address ) . subscribe ( ( error ) => {
15971595 console . log ( 'Error:' , error ) ;
0 commit comments