@@ -171,88 +171,88 @@ describe('TransactionHttp', () => {
171171 } ) ;
172172 } ) ;
173173
174- describe ( 'MosaicDefinitionTransaction' , ( ) => {
175- let listener : Listener ;
176- before ( ( ) => {
177- listener = new Listener ( config . apiUrl ) ;
178- return listener . open ( ) ;
179- } ) ;
180- after ( ( ) => {
181- return listener . close ( ) ;
182- } ) ;
183- it ( 'aggregate' , ( done ) => {
184- const nonce = MosaicNonce . createRandom ( ) ;
185- const mosaicDefinitionTransaction = MosaicDefinitionTransaction . create (
186- Deadline . create ( ) ,
187- nonce ,
188- MosaicId . createFromNonce ( nonce , account . publicAccount ) ,
189- MosaicProperties . create ( {
190- supplyMutable : true ,
191- transferable : true ,
192- divisibility : 3 ,
193- restrictable : true ,
194- } ) ,
195- NetworkType . MIJIN_TEST ,
196- ) ;
197- const aggregateTransaction = AggregateTransaction . createComplete ( Deadline . create ( ) ,
198- [ mosaicDefinitionTransaction . toAggregate ( account . publicAccount ) ] ,
199- NetworkType . MIJIN_TEST ,
200- [ ] ) ;
201- const signedTransaction = aggregateTransaction . signWith ( account , generationHash ) ;
202- listener . confirmed ( account . address ) . subscribe ( ( transaction : Transaction ) => {
203- done ( ) ;
204- } ) ;
205- listener . status ( account . address ) . subscribe ( ( error ) => {
206- console . log ( 'Error:' , error ) ;
207- assert ( false ) ;
208- done ( ) ;
209- } ) ;
210- transactionHttp . announce ( signedTransaction ) ;
211- } ) ;
212- } ) ;
213-
214- describe ( 'AccountMetadataTransaction' , ( ) => {
215- let listener : Listener ;
216- before ( ( ) => {
217- listener = new Listener ( config . apiUrl ) ;
218- return listener . open ( ) ;
219- } ) ;
220- after ( ( ) => {
221- return listener . close ( ) ;
222- } ) ;
223- it ( 'aggregate' , ( done ) => {
224- const accountMetadataTransaction = AccountMetadataTransaction . create (
225- Deadline . create ( ) ,
226- account . publicKey ,
227- UInt64 . fromUint ( 1000 ) ,
228- 10 ,
229- new Uint8Array ( 10 ) ,
230- NetworkType . MIJIN_TEST ,
231- ) ;
174+ // describe('MosaicDefinitionTransaction', () => {
175+ // let listener: Listener;
176+ // before (() => {
177+ // listener = new Listener(config.apiUrl);
178+ // return listener.open();
179+ // });
180+ // after(() => {
181+ // return listener.close();
182+ // });
183+ // it('aggregate', (done) => {
184+ // const nonce = MosaicNonce.createRandom();
185+ // const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create(
186+ // Deadline.create(),
187+ // nonce,
188+ // MosaicId.createFromNonce(nonce, account.publicAccount),
189+ // MosaicProperties.create({
190+ // supplyMutable: true,
191+ // transferable: true,
192+ // divisibility: 3,
193+ // restrictable: true,
194+ // }),
195+ // NetworkType.MIJIN_TEST,
196+ // );
197+ // const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(),
198+ // [mosaicDefinitionTransaction.toAggregate(account.publicAccount)],
199+ // NetworkType.MIJIN_TEST,
200+ // []);
201+ // const signedTransaction = aggregateTransaction.signWith(account, generationHash);
202+ // listener.confirmed(account.address).subscribe((transaction: Transaction) => {
203+ // done();
204+ // });
205+ // listener.status(account.address).subscribe((error) => {
206+ // console.log('Error:', error);
207+ // assert(false);
208+ // done();
209+ // });
210+ // transactionHttp.announce(signedTransaction);
211+ // });
212+ // });
232213
233- const aggregateTransaction = AggregateTransaction . createComplete ( Deadline . create ( ) ,
234- [ accountMetadataTransaction . toAggregate ( account . publicAccount ) ] ,
235- NetworkType . MIJIN_TEST ,
236- [ ] ,
237- ) ;
238- const signedTransaction = aggregateTransaction . signWith ( account , generationHash ) ;
239- listener . confirmed ( account . address ) . subscribe ( ( transaction : AggregateTransaction ) => {
240- transaction . innerTransactions . forEach ( ( innerTx ) => {
241- expect ( ( innerTx as AccountMetadataTransaction ) . targetPublicKey , 'TargetPublicKey' ) . not . to . be . undefined ;
242- expect ( ( innerTx as AccountMetadataTransaction ) . scopedMetadataKey , 'ScopedMetadataKey' ) . not . to . be . undefined ;
243- expect ( ( innerTx as AccountMetadataTransaction ) . valueSizeDelta , 'ValueSizeDelta' ) . not . to . be . undefined ;
244- expect ( ( innerTx as AccountMetadataTransaction ) . value , 'Value' ) . not . to . be . undefined ;
245- } ) ;
246- done ( ) ;
247- } ) ;
248- listener . status ( account . address ) . subscribe ( ( error ) => {
249- console . log ( 'Error:' , error ) ;
250- assert ( false ) ;
251- done ( ) ;
252- } ) ;
253- transactionHttp . announce ( signedTransaction ) ;
254- } ) ;
255- } ) ;
214+ // describe('AccountMetadataTransaction', () => {
215+ // let listener: Listener;
216+ // before (() => {
217+ // listener = new Listener(config.apiUrl);
218+ // return listener.open();
219+ // });
220+ // after(() => {
221+ // return listener.close();
222+ // });
223+ // it('aggregate', (done) => {
224+ // const accountMetadataTransaction = AccountMetadataTransaction.create(
225+ // Deadline.create(),
226+ // account.publicKey,
227+ // UInt64.fromUint(5),
228+ // 10,
229+ // new Uint8Array(10),
230+ // NetworkType.MIJIN_TEST,
231+ // );
232+
233+ // const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(),
234+ // [accountMetadataTransaction.toAggregate(account.publicAccount)],
235+ // NetworkType.MIJIN_TEST,
236+ // [],
237+ // );
238+ // const signedTransaction = aggregateTransaction.signWith(account, generationHash);
239+ // listener.confirmed(account.address).subscribe((transaction: AggregateTransaction) => {
240+ // transaction.innerTransactions.forEach((innerTx) => {
241+ // expect((innerTx as AccountMetadataTransaction).targetPublicKey, 'TargetPublicKey').not.to.be.undefined;
242+ // expect((innerTx as AccountMetadataTransaction).scopedMetadataKey, 'ScopedMetadataKey').not.to.be.undefined;
243+ // expect((innerTx as AccountMetadataTransaction).valueSizeDelta, 'ValueSizeDelta').not.to.be.undefined;
244+ // expect((innerTx as AccountMetadataTransaction).value, 'Value').not.to.be.undefined;
245+ // });
246+ // done();
247+ // });
248+ // listener.status(account.address).subscribe((error) => {
249+ // console.log('Error:', error);
250+ // assert(false);
251+ // done();
252+ // });
253+ // transactionHttp.announce(signedTransaction);
254+ // });
255+ // });
256256
257257 describe ( 'MosaicMetadataTransaction' , ( ) => {
258258 let listener : Listener ;
@@ -267,7 +267,7 @@ describe('TransactionHttp', () => {
267267 const mosaicMetadataTransaction = MosaicMetadataTransaction . create (
268268 Deadline . create ( ) ,
269269 account . publicKey ,
270- UInt64 . fromUint ( 1000 ) ,
270+ UInt64 . fromUint ( 5 ) ,
271271 mosaicId ,
272272 10 ,
273273 new Uint8Array ( 10 ) ,
@@ -313,7 +313,7 @@ describe('TransactionHttp', () => {
313313 const registerNamespaceTransaction = NamespaceRegistrationTransaction . createRootNamespace (
314314 Deadline . create ( ) ,
315315 namespaceName ,
316- UInt64 . fromUint ( 1000 ) ,
316+ UInt64 . fromUint ( 5 ) ,
317317 NetworkType . MIJIN_TEST ,
318318 ) ;
319319 namespaceId = new NamespaceId ( namespaceName ) ;
@@ -346,7 +346,7 @@ describe('TransactionHttp', () => {
346346 const registerNamespaceTransaction = NamespaceRegistrationTransaction . createRootNamespace (
347347 Deadline . create ( ) ,
348348 'root-test-namespace-' + Math . floor ( Math . random ( ) * 10000 ) ,
349- UInt64 . fromUint ( 1000 ) ,
349+ UInt64 . fromUint ( 5 ) ,
350350 NetworkType . MIJIN_TEST ,
351351 ) ;
352352 const aggregateTransaction = AggregateTransaction . createComplete ( Deadline . create ( ) ,
@@ -379,7 +379,7 @@ describe('TransactionHttp', () => {
379379 const namespaceMetadataTransaction = NamespaceMetadataTransaction . create (
380380 Deadline . create ( ) ,
381381 account . publicKey ,
382- UInt64 . fromUint ( 1000 ) ,
382+ UInt64 . fromUint ( 5 ) ,
383383 namespaceId ,
384384 10 ,
385385 new Uint8Array ( 10 ) ,
@@ -545,7 +545,7 @@ describe('TransactionHttp', () => {
545545 listener . confirmed ( account . address ) . subscribe ( ( transaction : TransferTransaction ) => {
546546 expect ( transaction . message , 'Message' ) . not . to . be . undefined ;
547547 expect ( transaction . mosaics , 'Mosaic' ) . not . to . be . undefined ;
548- expect ( transaction . recipient , 'Recipient ' ) . not . to . be . undefined ;
548+ expect ( transaction . recipientAddress , 'RecipientAddress ' ) . not . to . be . undefined ;
549549 done ( ) ;
550550 } ) ;
551551 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -988,7 +988,7 @@ describe('TransactionHttp', () => {
988988 const signedTransaction = accountLinkTransaction . signWith ( account , generationHash ) ;
989989
990990 listener . confirmed ( account . address ) . subscribe ( ( transaction : AccountLinkTransaction ) => {
991- expect ( transaction . remoteAccountKey , 'RemoteAccountKey ' ) . not . to . be . undefined ;
991+ expect ( transaction . remotePublicKey , 'RemotePublicKey ' ) . not . to . be . undefined ;
992992 expect ( transaction . linkAction , 'LinkAction' ) . not . to . be . undefined ;
993993 done ( ) ;
994994 } ) ;
@@ -1408,7 +1408,7 @@ describe('TransactionHttp', () => {
14081408 expect ( transaction . duration , 'Duration' ) . not . to . be . undefined ;
14091409 expect ( transaction . hashType , 'HashType' ) . not . to . be . undefined ;
14101410 expect ( transaction . secret , 'Secret' ) . not . to . be . undefined ;
1411- expect ( transaction . recipient , 'Recipient ' ) . not . to . be . undefined ;
1411+ expect ( transaction . recipientAddress , 'RecipientAddress ' ) . not . to . be . undefined ;
14121412 done ( ) ;
14131413 } ) ;
14141414 listener . status ( account . address ) . subscribe ( ( error ) => {
@@ -1676,7 +1676,7 @@ describe('TransactionHttp', () => {
16761676 listener . confirmed ( account . address ) . subscribe ( ( ) => {
16771677 listener . confirmed ( account2 . address ) . subscribe ( ( transaction : SecretProofTransaction ) => {
16781678 expect ( transaction . secret , 'Secret' ) . not . to . be . undefined ;
1679- expect ( transaction . recipient , 'Recipient ' ) . not . to . be . undefined ;
1679+ expect ( transaction . recipientAddress , 'RecipientAddress ' ) . not . to . be . undefined ;
16801680 expect ( transaction . hashType , 'HashType' ) . not . to . be . undefined ;
16811681 expect ( transaction . proof , 'Proof' ) . not . to . be . undefined ;
16821682 done ( ) ;
@@ -2098,7 +2098,7 @@ describe('TransactionHttp', () => {
20982098
20992099 // 03. Alice collects the cosignatures, recreate, sign, and announces the transaction
21002100 const cosignatureSignedTransactions = [
2101- new CosignatureSignedTransaction ( signedTxBob . parentHash , signedTxBob . signature , signedTxBob . signer ) ,
2101+ new CosignatureSignedTransaction ( signedTxBob . parentHash , signedTxBob . signature , signedTxBob . signerPublicKey ) ,
21022102 ] ;
21032103 const recreatedTx = TransactionMapping . createFromPayload ( aliceSignedTransaction . payload ) as AggregateTransaction ;
21042104
@@ -2256,31 +2256,4 @@ describe('TransactionHttp', () => {
22562256 } ) ;
22572257 } ) ;
22582258 } ) ;
2259- // describe('announceSync', () => {
2260- // it('should return insufficient balance error', (done) => {
2261- // const aggregateTransaction = AggregateTransaction.createBonded(
2262- // Deadline.create(),
2263- // [],
2264- // NetworkType.MIJIN_TEST,
2265- // [],
2266- // );
2267- // const signedTransaction = account.sign(aggregateTransaction);
2268-
2269- // const lockFundsTransaction = LockFundsTransaction.create(Deadline.create(),
2270- // NetworkCurrencyMosaic.createAbsolute(0),
2271- // UInt64.fromUint(10000),
2272- // signedTransaction,
2273- // NetworkType.MIJIN_TEST);
2274-
2275- // transactionHttp
2276- // .announceSync(lockFundsTransaction.signWith(account, generationHash))
2277- // .subscribe((shouldNotBeCalled) => {
2278- // throw new Error('should not be called');
2279- // }, (err) => {
2280- // console.log(err);
2281- // expect(err.status).to.be.equal('Failure_LockHash_Invalid_Mosaic_Amount');
2282- // done();
2283- // });
2284- // });
2285- // });
22862259} ) ;
0 commit comments