Skip to content

Commit

Permalink
feat: remove BatchIssue constant
Browse files Browse the repository at this point in the history
  • Loading branch information
shuffledex committed Sep 23, 2020
1 parent 8d19fdb commit af5cad3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/middleware/types.ts
Expand Up @@ -761,7 +761,6 @@ export enum CallIdEnum {
TransferFrom = 'transfer_from',
CreateCheckpoint = 'create_checkpoint',
Issue = 'issue',
BatchIssue = 'batch_issue',
Redeem = 'redeem',
RedeemFrom = 'redeem_from',
ControllerRedeem = 'controller_redeem',
Expand Down
6 changes: 3 additions & 3 deletions src/utils/__tests__/index.ts
Expand Up @@ -2400,7 +2400,7 @@ describe('requestAtBlock', () => {

describe('batchArguments', () => {
test('should return chunks of data', () => {
const tag = TxTags.asset.BatchIssue;
const tag = TxTags.asset.BatchAddDocument;
const expectedBatchLength = MAX_BATCH_ELEMENTS[tag];

const elements = range(0, 3 * expectedBatchLength + 1);
Expand All @@ -2415,7 +2415,7 @@ describe('batchArguments', () => {
});

test('should use a custom batching function to group elements', () => {
const tag = TxTags.asset.BatchIssue;
const tag = TxTags.asset.BatchAddDocument;
const expectedBatchLength = MAX_BATCH_ELEMENTS[tag];

const elements = range(0, 2 * expectedBatchLength);
Expand All @@ -2435,7 +2435,7 @@ describe('batchArguments', () => {
});

test('should throw an error if a custom batch has a size bigger than the limit', () => {
const tag = TxTags.asset.BatchIssue;
const tag = TxTags.asset.BatchAddDocument;
const expectedBatchLength = MAX_BATCH_ELEMENTS[tag];

const elements = range(0, 3 * expectedBatchLength);
Expand Down
1 change: 0 additions & 1 deletion src/utils/constants.ts
Expand Up @@ -9,7 +9,6 @@ export const MAX_MODULE_LENGTH = 32;
export const MAX_TOKEN_AMOUNT = new BigNumber(Math.pow(10, 12));
export const DUMMY_ACCOUNT_ID = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
export const MAX_BATCH_ELEMENTS = {
[TxTags.asset.BatchIssue]: 200,
[TxTags.asset.BatchAddDocument]: 20,
[TxTags.asset.BatchRemoveDocument]: 20,
[TxTags.identity.BatchAcceptAuthorization]: 100,
Expand Down

0 comments on commit af5cad3

Please sign in to comment.