@@ -44,6 +44,7 @@ import {AggregateTransaction} from '../../src/model/transaction/AggregateTransac
4444import { CosignatureSignedTransaction } from '../../src/model/transaction/CosignatureSignedTransaction' ;
4545import { CosignatureTransaction } from '../../src/model/transaction/CosignatureTransaction' ;
4646import { Deadline } from '../../src/model/transaction/Deadline' ;
47+ import { HashLockTransaction } from '../../src/model/transaction/HashLockTransaction' ;
4748import { HashType } from '../../src/model/transaction/HashType' ;
4849import { LinkAction } from '../../src/model/transaction/LinkAction' ;
4950import { LockFundsTransaction } from '../../src/model/transaction/LockFundsTransaction' ;
@@ -485,7 +486,7 @@ describe('TransactionHttp', () => {
485486 const accountLinkTransaction = AccountLinkTransaction . create (
486487 Deadline . create ( ) ,
487488 harvestingAccount . publicKey ,
488- LinkAction . Unlink ,
489+ LinkAction . Link ,
489490 NetworkType . MIJIN_TEST ,
490491 ) ;
491492 const signedTransaction = accountLinkTransaction . signWith ( account ) ;
@@ -757,7 +758,7 @@ describe('TransactionHttp', () => {
757758 } ) ;
758759 } ) ;
759760
760- describe ( 'SecretLockTransaction - MosaicAlias' , ( ) => {
761+ describe ( 'HashLockTransaction - MosaicAlias' , ( ) => {
761762 let listener : Listener ;
762763 before ( ( ) => {
763764 listener = new Listener ( config . apiUrl ) ;
@@ -767,15 +768,19 @@ describe('TransactionHttp', () => {
767768 return listener . close ( ) ;
768769 } ) ;
769770 it ( 'standalone' , ( done ) => {
770- const secretLockTransaction = SecretLockTransaction . create (
771+ const aggregateTransaction = AggregateTransaction . createBonded (
771772 Deadline . create ( ) ,
772- new Mosaic ( namespaceId , UInt64 . fromUint ( 10 * Math . pow ( 10 , NetworkCurrencyMosaic . DIVISIBILITY ) ) ) ,
773- UInt64 . fromUint ( 100 ) ,
774- HashType . Op_Sha3_256 ,
775- sha3_256 . create ( ) . update ( nacl_catapult . randomBytes ( 20 ) ) . hex ( ) ,
776- account2 . address ,
773+ [ ] ,
777774 NetworkType . MIJIN_TEST ,
775+ [ ] ,
778776 ) ;
777+ const signedTransaction = account . sign ( aggregateTransaction ) ;
778+ const hashLockTransaction = HashLockTransaction . create ( Deadline . create ( ) ,
779+ new Mosaic ( new NamespaceId ( 'cat.currency' ) , UInt64 . fromUint ( 10 * Math . pow ( 10 , NetworkCurrencyMosaic . DIVISIBILITY ) ) ) ,
780+ UInt64 . fromUint ( 10000 ) ,
781+ signedTransaction ,
782+ NetworkType . MIJIN_TEST ) ;
783+
779784 listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
780785 done ( ) ;
781786 } ) ;
@@ -784,7 +789,7 @@ describe('TransactionHttp', () => {
784789 assert ( false ) ;
785790 done ( ) ;
786791 } ) ;
787- transactionHttp . announce ( secretLockTransaction . signWith ( account ) ) ;
792+ transactionHttp . announce ( hashLockTransaction . signWith ( account ) ) ;
788793 } ) ;
789794 } ) ;
790795
@@ -1556,7 +1561,6 @@ describe('TransactionHttp', () => {
15561561 const hash = sha256 ( Buffer . from ( secretSeed , 'hex' ) ) ;
15571562 const secret = sha256 ( Buffer . from ( hash , 'hex' ) ) ;
15581563 const proof = secretSeed ;
1559- let proofAnnounced = false ;
15601564 const secretLockTransaction = SecretLockTransaction . create (
15611565 Deadline . create ( ) ,
15621566 NetworkCurrencyMosaic . createAbsolute ( 10 ) ,
0 commit comments