Skip to content

Commit 2583f86

Browse files
committed
Renamed RestrictionType to AccountRestrictionType
1 parent 7721858 commit 2583f86

File tree

2 files changed

+4
-98
lines changed

2 files changed

+4
-98
lines changed

e2e/infrastructure/AccountHttp.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { AccountRestrictionType } from '../../src/model/account/AccountRestricti
2323
import {Address} from '../../src/model/account/Address';
2424
import {PublicAccount} from '../../src/model/account/PublicAccount';
2525
import { RestrictionModificationType } from '../../src/model/account/RestrictionModificationType';
26-
import { RestrictionType } from '../../src/model/account/RestrictionType';
2726
import {NetworkType} from '../../src/model/blockchain/NetworkType';
2827
import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic';
2928
import { AliasAction } from '../../src/model/namespace/AliasAction';
@@ -427,7 +426,11 @@ describe('AccountHttp', () => {
427426
);
428427
const addressModification = AccountRestrictionTransaction.createAddressRestrictionModificationTransaction(
429428
Deadline.create(),
429+
<<<<<<< HEAD
430430
AccountRestrictionType.BlockIncomingAddress,
431+
=======
432+
AccountRestrictionType.BlockAddress,
433+
>>>>>>> Renamed RestrictionType to AccountRestrictionType
431434
[addressPropertyFilter],
432435
NetworkType.MIJIN_TEST,
433436
);
Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +0,0 @@
1-
/*
2-
* Copyright 2019 NEM
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"),
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
17-
/**
18-
* Account restriction type
19-
* 0x01 Account restriction type is an address.
20-
* 0x02 Account restriction type is a mosaic id.
21-
* 0x04 Account restriction type is a transaction type.
22-
* 0x05 restriction type sentinel.
23-
* 0x40 Account restriction is interpreted as outgoing restriction.
24-
* 0x80 Account restriction is interpreted as blocking operation.
25-
*/
26-
27-
// !!This enum will be deprecated once catbuffer code applied.
28-
enum AccountRestrictionTypeEnum {
29-
Address = 0x01,
30-
Mosaic = 0x02,
31-
TransactionType = 0x04,
32-
Sentinel = 0x05,
33-
Outgoing = 0x40,
34-
Block = 0x80,
35-
}
36-
37-
export enum AccountRestrictionType {
38-
/**
39-
* Allow only incoming transactions from a given address.
40-
*/
41-
AllowIncomingAddress = AccountRestrictionTypeEnum.Address,
42-
43-
/**
44-
* Allow only incoming transactions containing a a given mosaic identifier.
45-
*/
46-
AllowMosaic = AccountRestrictionTypeEnum.Mosaic,
47-
48-
/**
49-
* Allow only outgoing transactions with a given transaction type.
50-
*/
51-
AllowIncomingTransactionType = AccountRestrictionTypeEnum.TransactionType,
52-
53-
/**
54-
* Allow only outgoing transactions to a given address.
55-
*/
56-
AllowOutgoingAddress = (AccountRestrictionTypeEnum.Address + AccountRestrictionTypeEnum.Outgoing),
57-
58-
/**
59-
* Allow only outgoing transactions with a given transaction type.
60-
*/
61-
AllowOutgoingTransactionType = (AccountRestrictionTypeEnum.TransactionType +
62-
AccountRestrictionTypeEnum.Outgoing),
63-
64-
/**
65-
* Block incoming transactions from a given address.
66-
*/
67-
BlockIncomingAddress = (AccountRestrictionTypeEnum.Address + AccountRestrictionTypeEnum.Block),
68-
69-
/**
70-
* Block incoming transactions containing a given mosaic identifier.
71-
*/
72-
BlockMosaic = (AccountRestrictionTypeEnum.Mosaic + AccountRestrictionTypeEnum.Block),
73-
74-
/**
75-
* Block incoming transactions with a given transaction type.
76-
*/
77-
BlockIncomingTransactionType = (AccountRestrictionTypeEnum.TransactionType +
78-
AccountRestrictionTypeEnum.Block),
79-
80-
/**
81-
* Block outgoing transactions from a given address.
82-
*/
83-
BlockOutgoingAddress = (AccountRestrictionTypeEnum.Address +
84-
AccountRestrictionTypeEnum.Block +
85-
AccountRestrictionTypeEnum.Outgoing),
86-
/**
87-
* Block outgoing transactions with a given transaction type.
88-
*/
89-
BlockOutgoingTransactionType = (AccountRestrictionTypeEnum.TransactionType +
90-
AccountRestrictionTypeEnum.Block +
91-
AccountRestrictionTypeEnum.Outgoing),
92-
93-
/**
94-
* Account restriction sentinel.
95-
*/
96-
Sentinel = AccountRestrictionTypeEnum.Sentinel,
97-
}

0 commit comments

Comments
 (0)