14
14
* limitations under the License.
15
15
*/
16
16
17
- import { deepEqual } from 'assert' ;
18
17
import { assert , expect } from 'chai' ;
19
18
import { AccountHttp } from '../../src/infrastructure/AccountHttp' ;
20
- import { Listener , TransactionHttp } from '../../src/infrastructure/infrastructure' ;
21
- import { RestrictionHttp } from '../../src/infrastructure/RestrictionHttp' ;
19
+ import { Listener } from '../../src/infrastructure/Listener' ;
20
+ import { MultisigHttp } from '../../src/infrastructure/MultisigHttp' ;
21
+ import { NamespaceHttp } from '../../src/infrastructure/NamespaceHttp' ;
22
+ import { RestrictionAccountHttp } from '../../src/infrastructure/RestrictionAccountHttp' ;
23
+ import { TransactionHttp } from '../../src/infrastructure/TransactionHttp' ;
22
24
import { Account } from '../../src/model/account/Account' ;
23
25
import { Address } from '../../src/model/account/Address' ;
24
26
import { PublicAccount } from '../../src/model/account/PublicAccount' ;
@@ -27,16 +29,10 @@ import { PlainMessage } from '../../src/model/message/PlainMessage';
27
29
import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic' ;
28
30
import { AliasAction } from '../../src/model/namespace/AliasAction' ;
29
31
import { NamespaceId } from '../../src/model/namespace/NamespaceId' ;
30
- import { AccountRestrictionModificationAction } from '../../src/model/restriction/AccountRestrictionModificationAction' ;
31
- import { AccountRestrictionFlags } from '../../src/model/restriction/AccountRestrictionType' ;
32
- import { AccountRestrictionModification } from '../../src/model/transaction/AccountRestrictionModification' ;
33
- import { AccountRestrictionTransaction } from '../../src/model/transaction/AccountRestrictionTransaction' ;
34
32
import { AddressAliasTransaction } from '../../src/model/transaction/AddressAliasTransaction' ;
35
33
import { AggregateTransaction } from '../../src/model/transaction/AggregateTransaction' ;
36
- import { CosignatoryModificationAction } from '../../src/model/transaction/CosignatoryModificationAction' ;
37
34
import { Deadline } from '../../src/model/transaction/Deadline' ;
38
35
import { MultisigAccountModificationTransaction } from '../../src/model/transaction/MultisigAccountModificationTransaction' ;
39
- import { MultisigCosignatoryModification } from '../../src/model/transaction/MultisigCosignatoryModification' ;
40
36
import { NamespaceRegistrationTransaction } from '../../src/model/transaction/NamespaceRegistrationTransaction' ;
41
37
import { TransferTransaction } from '../../src/model/transaction/TransferTransaction' ;
42
38
import { UInt64 } from '../../src/model/UInt64' ;
@@ -53,7 +49,9 @@ describe('AccountHttp', () => {
53
49
let accountPublicKey : string ;
54
50
let publicAccount : PublicAccount ;
55
51
let accountHttp : AccountHttp ;
56
- let restrictionHttp : RestrictionHttp ;
52
+ let multisigHttp : MultisigHttp ;
53
+ let namespaceHttp : NamespaceHttp ;
54
+ let restrictionHttp : RestrictionAccountHttp ;
57
55
let transactionHttp : TransactionHttp ;
58
56
let namespaceId : NamespaceId ;
59
57
let generationHash : string ;
@@ -80,7 +78,9 @@ describe('AccountHttp', () => {
80
78
generationHash = json . generationHash ;
81
79
accountHttp = new AccountHttp ( json . apiUrl ) ;
82
80
transactionHttp = new TransactionHttp ( json . apiUrl ) ;
83
- restrictionHttp = new RestrictionHttp ( json . apiUrl ) ;
81
+ restrictionHttp = new RestrictionAccountHttp ( json . apiUrl ) ;
82
+ multisigHttp = new MultisigHttp ( json . apiUrl ) ;
83
+ namespaceHttp = new NamespaceHttp ( json . apiUrl ) ;
84
84
done ( ) ;
85
85
} ) ;
86
86
} ) ;
@@ -256,7 +256,7 @@ describe('AccountHttp', () => {
256
256
describe ( 'getMultisigAccountGraphInfo' , ( ) => {
257
257
it ( 'should call getMultisigAccountGraphInfo successfully' , ( done ) => {
258
258
setTimeout ( ( ) => {
259
- accountHttp . getMultisigAccountGraphInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountGraphInfo ) => {
259
+ multisigHttp . getMultisigAccountGraphInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountGraphInfo ) => {
260
260
expect ( multisigAccountGraphInfo . multisigAccounts . get ( 0 ) ! [ 0 ] .
261
261
account . publicKey ) . to . be . equal ( multisigAccount . publicKey ) ;
262
262
done ( ) ;
@@ -267,7 +267,7 @@ describe('AccountHttp', () => {
267
267
describe ( 'getMultisigAccountInfo' , ( ) => {
268
268
it ( 'should call getMultisigAccountInfo successfully' , ( done ) => {
269
269
setTimeout ( ( ) => {
270
- accountHttp . getMultisigAccountInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountInfo ) => {
270
+ multisigHttp . getMultisigAccountInfo ( multisigAccount . publicAccount . address ) . subscribe ( ( multisigAccountInfo ) => {
271
271
expect ( multisigAccountInfo . account . publicKey ) . to . be . equal ( multisigAccount . publicKey ) ;
272
272
done ( ) ;
273
273
} ) ;
@@ -277,7 +277,7 @@ describe('AccountHttp', () => {
277
277
278
278
describe ( 'outgoingTransactions' , ( ) => {
279
279
it ( 'should call outgoingTransactions successfully' , ( done ) => {
280
- accountHttp . outgoingTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
280
+ accountHttp . getAccountOutgoingTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
281
281
expect ( transactions . length ) . to . be . greaterThan ( 0 ) ;
282
282
done ( ) ;
283
283
} ) ;
@@ -286,7 +286,7 @@ describe('AccountHttp', () => {
286
286
287
287
describe ( 'aggregateBondedTransactions' , ( ) => {
288
288
it ( 'should call aggregateBondedTransactions successfully' , ( done ) => {
289
- accountHttp . aggregateBondedTransactions ( publicAccount . address ) . subscribe ( ( ) => {
289
+ accountHttp . getAccountPartialTransactions ( publicAccount . address ) . subscribe ( ( ) => {
290
290
done ( ) ;
291
291
} , ( error ) => {
292
292
console . log ( 'Error:' , error ) ;
@@ -297,7 +297,7 @@ describe('AccountHttp', () => {
297
297
298
298
describe ( 'transactions' , ( ) => {
299
299
it ( 'should call transactions successfully' , ( done ) => {
300
- accountHttp . transactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
300
+ accountHttp . getAccountTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
301
301
expect ( transactions . length ) . to . be . greaterThan ( 0 ) ;
302
302
done ( ) ;
303
303
} ) ;
@@ -306,7 +306,7 @@ describe('AccountHttp', () => {
306
306
307
307
describe ( 'unconfirmedTransactions' , ( ) => {
308
308
it ( 'should call unconfirmedTransactions successfully' , ( done ) => {
309
- accountHttp . unconfirmedTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
309
+ accountHttp . getAccountUnconfirmedTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
310
310
expect ( transactions . length ) . to . be . equal ( 0 ) ;
311
311
done ( ) ;
312
312
} ) ;
@@ -315,7 +315,7 @@ describe('AccountHttp', () => {
315
315
316
316
describe ( 'getAddressNames' , ( ) => {
317
317
it ( 'should call getAddressNames successfully' , ( done ) => {
318
- accountHttp . getAccountsNames ( [ accountAddress ] ) . subscribe ( ( addressNames ) => {
318
+ namespaceHttp . getAccountsNames ( [ accountAddress ] ) . subscribe ( ( addressNames ) => {
319
319
expect ( addressNames . length ) . to . be . greaterThan ( 0 ) ;
320
320
done ( ) ;
321
321
} ) ;
0 commit comments