@@ -120,7 +120,6 @@ describe('AccountHttp', () => {
120120 } ) ;
121121
122122 describe ( 'Setup test AddressAlias' , ( ) => {
123-
124123 it ( 'Announce addressAliasTransaction' , ( ) => {
125124 const addressAliasTransaction = AddressAliasTransaction . create (
126125 Deadline . create ( ) ,
@@ -136,29 +135,29 @@ describe('AccountHttp', () => {
136135 } ) ;
137136
138137 describe ( 'Setup test multisig account' , ( ) => {
139-
140138 it ( 'Announce MultisigAccountModificationTransaction' , ( ) => {
141139 const modifyMultisigAccountTransaction = MultisigAccountModificationTransaction . create (
142140 Deadline . create ( ) ,
143141 2 ,
144142 1 ,
145- [
146- cosignAccount1 . publicAccount ,
147- cosignAccount2 . publicAccount ,
148- cosignAccount3 . publicAccount ,
149- ] ,
143+ [ cosignAccount1 . publicAccount , cosignAccount2 . publicAccount , cosignAccount3 . publicAccount ] ,
150144 [ ] ,
151145 networkType ,
152146 helper . maxFee ,
153147 ) ;
154148
155- const aggregateTransaction = AggregateTransaction . createComplete ( Deadline . create ( ) ,
149+ const aggregateTransaction = AggregateTransaction . createComplete (
150+ Deadline . create ( ) ,
156151 [ modifyMultisigAccountTransaction . toAggregate ( multisigAccount . publicAccount ) ] ,
157152 networkType ,
158153 [ ] ,
159- helper . maxFee ) ;
160- const signedTransaction = aggregateTransaction
161- . signTransactionWithCosignatories ( multisigAccount , [ cosignAccount1 , cosignAccount2 , cosignAccount3 ] , generationHash ) ;
154+ helper . maxFee ,
155+ ) ;
156+ const signedTransaction = aggregateTransaction . signTransactionWithCosignatories (
157+ multisigAccount ,
158+ [ cosignAccount1 , cosignAccount2 , cosignAccount3 ] ,
159+ generationHash ,
160+ ) ;
162161
163162 return helper . announce ( signedTransaction ) ;
164163 } ) ;
@@ -186,8 +185,9 @@ describe('AccountHttp', () => {
186185
187186 describe ( 'getMultisigAccountGraphInfo' , ( ) => {
188187 it ( 'should call getMultisigAccountGraphInfo successfully' , async ( ) => {
189- const multisigAccountGraphInfo =
190- await multisigRepository . getMultisigAccountGraphInfo ( multisigAccount . publicAccount . address ) . toPromise ( ) ;
188+ const multisigAccountGraphInfo = await multisigRepository
189+ . getMultisigAccountGraphInfo ( multisigAccount . publicAccount . address )
190+ . toPromise ( ) ;
191191 expect ( multisigAccountGraphInfo . multisigAccounts . get ( 0 ) ! [ 0 ] . account . publicKey ) . to . be . equal ( multisigAccount . publicKey ) ;
192192 } ) ;
193193 } ) ;
@@ -213,26 +213,37 @@ describe('AccountHttp', () => {
213213
214214 describe ( 'transactions' , ( ) => {
215215 it ( 'should not return accounts when account does not exist' , ( ) => {
216- return accountRepository . getAccountInfo ( Account . generateNewAccount ( networkType ) . address ) . toPromise ( ) . then ( ( ) => {
217- return Promise . reject ( 'should fail!' ) ;
218- } , ( err ) => {
219- const error = JSON . parse ( err . message ) ;
220- expect ( error . statusCode ) . to . be . eq ( 404 ) ;
221- expect ( error . errorDetails . statusMessage ) . to . be . eq ( 'Not Found' ) ;
222- return Promise . resolve ( ) ;
223- } ) ;
216+ return accountRepository
217+ . getAccountInfo ( Account . generateNewAccount ( networkType ) . address )
218+ . toPromise ( )
219+ . then (
220+ ( ) => {
221+ return Promise . reject ( 'should fail!' ) ;
222+ } ,
223+ ( err ) => {
224+ const error = JSON . parse ( err . message ) ;
225+ expect ( error . statusCode ) . to . be . eq ( 404 ) ;
226+ expect ( error . errorDetails . statusMessage ) . to . be . eq ( 'Not Found' ) ;
227+ return Promise . resolve ( ) ;
228+ } ,
229+ ) ;
224230 } ) ;
225231 } ) ;
226232
227233 describe ( 'transactions' , ( ) => {
228234 it ( 'should call transactions successfully by type' , async ( ) => {
229- const transactions = await accountRepository . getAccountTransactions (
230- publicAccount . address , new QueryParams ( ) , new TransactionFilter ( {
231- types : [ TransactionType . TRANSFER , TransactionType . AGGREGATE_COMPLETE ] ,
232- } ) ) . toPromise ( ) ;
235+ const transactions = await accountRepository
236+ . getAccountTransactions (
237+ publicAccount . address ,
238+ new QueryParams ( ) ,
239+ new TransactionFilter ( {
240+ types : [ TransactionType . TRANSFER , TransactionType . AGGREGATE_COMPLETE ] ,
241+ } ) ,
242+ )
243+ . toPromise ( ) ;
233244 expect ( transactions . length ) . to . be . greaterThan ( 0 ) ;
234245 transactions . forEach ( ( t ) => {
235- expect ( ( t . type === TransactionType . TRANSFER || t . type === TransactionType . AGGREGATE_COMPLETE ) ) . to . be . eq ( true ) ;
246+ expect ( t . type === TransactionType . TRANSFER || t . type === TransactionType . AGGREGATE_COMPLETE ) . to . be . eq ( true ) ;
236247 } ) ;
237248 } ) ;
238249 } ) ;
@@ -285,8 +296,7 @@ describe('AccountHttp', () => {
285296 - 1 ,
286297 0 ,
287298 [ ] ,
288- [ cosignAccount1 . publicAccount ,
289- ] ,
299+ [ cosignAccount1 . publicAccount ] ,
290300 networkType ,
291301 helper . maxFee ,
292302 ) ;
@@ -295,9 +305,7 @@ describe('AccountHttp', () => {
295305 0 ,
296306 0 ,
297307 [ ] ,
298- [
299- cosignAccount2 . publicAccount ,
300- ] ,
308+ [ cosignAccount2 . publicAccount ] ,
301309 networkType ,
302310 helper . maxFee ,
303311 ) ;
@@ -307,21 +315,27 @@ describe('AccountHttp', () => {
307315 - 1 ,
308316 - 1 ,
309317 [ ] ,
310- [
311- cosignAccount3 . publicAccount ,
312- ] ,
318+ [ cosignAccount3 . publicAccount ] ,
313319 networkType ,
314320 helper . maxFee ,
315321 ) ;
316322
317- const aggregateTransaction = AggregateTransaction . createComplete ( Deadline . create ( ) ,
318- [ removeCosigner1 . toAggregate ( multisigAccount . publicAccount ) ,
323+ const aggregateTransaction = AggregateTransaction . createComplete (
324+ Deadline . create ( ) ,
325+ [
326+ removeCosigner1 . toAggregate ( multisigAccount . publicAccount ) ,
319327 removeCosigner2 . toAggregate ( multisigAccount . publicAccount ) ,
320- removeCosigner3 . toAggregate ( multisigAccount . publicAccount ) ] ,
328+ removeCosigner3 . toAggregate ( multisigAccount . publicAccount ) ,
329+ ] ,
321330 networkType ,
322- [ ] , helper . maxFee ) ;
323- const signedTransaction = aggregateTransaction
324- . signTransactionWithCosignatories ( cosignAccount1 , [ cosignAccount2 , cosignAccount3 ] , generationHash ) ;
331+ [ ] ,
332+ helper . maxFee ,
333+ ) ;
334+ const signedTransaction = aggregateTransaction . signTransactionWithCosignatories (
335+ cosignAccount1 ,
336+ [ cosignAccount2 , cosignAccount3 ] ,
337+ generationHash ,
338+ ) ;
325339 return helper . announce ( signedTransaction ) ;
326340 } ) ;
327341 } ) ;
0 commit comments