Skip to content

Commit 06ea717

Browse files
author
Victor Wiebe
committed
fix: cloneDeep issue and prettier
1 parent 8172497 commit 06ea717

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/procedures/__tests__/MintTokens.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ImportMock, MockManager, StaticMockManager } from 'ts-mock-imports';
22
import { spy, restore } from 'sinon';
33
import { BigNumber, TransactionReceiptWithDecodedLogs } from '@polymathnetwork/contract-wrappers';
44
import * as contractWrappersModule from '@polymathnetwork/contract-wrappers';
5+
import { cloneDeep } from 'lodash';
56
import { MintTokens } from '../../procedures/MintTokens';
67
import { Procedure } from '../../procedures/Procedure';
78
import * as shareholdersEntityModule from '../../entities/SecurityToken/Shareholders';
@@ -19,8 +20,6 @@ import { mockFactories } from '../../testUtils/mockFactories';
1920
import { Shareholder } from '../../entities';
2021
import { SecurityToken } from '../../entities/SecurityToken/SecurityToken';
2122

22-
const cloneDeep = require('lodash/clonedeep');
23-
2423
const securityTokenId = 'ST ID';
2524
const testAddress = '0x6666666666666666666666666666666666666666';
2625
const testAddress2 = '0x9999999999999999999999999999999999999999';

src/procedures/__tests__/ModifyShareholderData.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { spy, restore } from 'sinon';
33
import * as contractWrappersModule from '@polymathnetwork/contract-wrappers';
44
import { TransactionReceiptWithDecodedLogs } from 'ethereum-protocol';
55
import { BigNumber, GeneralTransferManager_3_0_0 } from '@polymathnetwork/contract-wrappers';
6+
import { cloneDeep } from 'lodash';
67
import { ModifyShareholderData } from '../../procedures/ModifyShareholderData';
78
import { Procedure } from '../../procedures/Procedure';
89
import { ErrorCode, ProcedureType } from '../../types';
@@ -18,8 +19,6 @@ import { SecurityToken } from '../../entities/SecurityToken/SecurityToken';
1819
import { PolymathError } from '../../PolymathError';
1920
import { Shareholder } from '../../entities';
2021

21-
const cloneDeep = require('lodash/clonedeep');
22-
2322
const testAddress = '0x6666666666666666666666666666666666666666';
2423
const testAddress2 = '0x9999999999999999999999999999999999999999';
2524
const oldShareholdersData = [
@@ -255,7 +254,7 @@ describe('ModifyShareholderData', () => {
255254
securityTokenId: () => params.symbol,
256255
address: () => testAddress,
257256
};
258-
const fetchStub = shareholderFactoryMock.mock('fetch', Promise.resolve(shareholderObject));
257+
const fetchStub = shareholderFactoryMock.mock('fetch', shareholderObject);
259258

260259
// Real call
261260
const resolver = await target.prepareTransactions();

0 commit comments

Comments
 (0)